Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Friends,

I have created an asp.net webpage and have uploaded it onto a webserver. However when I try to view the page remotely, I get errors about the customerror tag in the web.config file. The page works locally with no errors or warnings. Also if I upload the page as a .html or .asp file, I can view it fine remotely. I have seen a lot of other people with this error, but the 'solutions' just say to change the customErrors tag to 'Off', which I have done and does not work, do you know is there an issue with the webserver or what could be the problem here?

Here is the error page:
XML
Server Error in '/' Application. Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>


Kindly guide me.
Posted
Comments
Azee 3-Oct-13 6:14am    
Hey there,

The server display this error when there is some kind of problem (either an exception on the page or configuration issue)

and when you set customerrors mode="Off" and browse instead of above content it displays the actual problem that is causing the application to not work.

You should be able to see the actual problem now.
What does the page display when you set customError mode="Off"?
Arunprasath Natarajan 3-Oct-13 6:21am    
No changes seen. Same error.
Azee 3-Oct-13 6:29am    
You should be able to see the problem. Anyway, do you have access to the server where the application is deployed? If you browse on the server locally, then instead of this page you should be able to see the real error.
Arunprasath Natarajan 3-Oct-13 7:58am    
Yeah, But I got the following error. "no relevant source lines"

1 solution

Why don't you check the error log(file log in server or mail log)? Are you maintaining any logs? Use components like log4net or nlog to implement the error logging. And set customErrors mode="On" & try again.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900