View Full Version : What is the problem?

01-04-2012, 11:51 AM

I am not an ASP.NET programmer, but I am trying to learn it.

Every time I try to run a code, I see the following message:

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 <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<customErrors mode="Off"/>

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 <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

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

What is the probem? How I could fix it?



01-04-2012, 01:22 PM
this means that there is an error in the program. in the config file there is a setting to enable errors so you can see them but you are not @ the server so you cannot see them. if you have access to the server go to the config file and turn them on- or you could browse at the server and i think if you are browsing localhost then it will show you the stacktrace. the pother part is saying that you can in the config file redirect users to a more friendly error page other than the ugly one asp.net spits out.

01-06-2012, 06:21 AM
yup, I too agree to what alykins suggested above.Instead of displaying that asp error page you can create a web page indicating an error message that can be best understood by the user.

01-08-2012, 11:49 PM

I will talking with my Host provider.


01-09-2012, 12:27 AM
I'm not a hot programmer in .NET, not yet anyway.

So, my two cents.
You are getting the msg because your page has no way of dealing with an error so it is actually telling you what to do if you want to see the error while on the internet.
Of course, this will show for anyuone who runs across the error but for the time it takes to fix it it is ok.
The fix needs to be made in the web.config file
It would look like this...

<customErrors defaultRedirect="~/Oooops.aspx" mode="Off"/>

If you turn the "Off" to "On" then the error page "Oooops.aspx" will catch the error and show what you want readers to see.

Don't forget to change the web.config file when the error is corrected.

@everone -
I would welcome someone explaining the right way to debug a problem like this without opening the error to public view.

Also, how to be notified of the error while using not showing the error to visitors.