Link to home
Start Free TrialLog in
Avatar of atsci
atsci

asked on

Server Error in '/' Application

I randomly am getting this error when running my ASP.NET application on a web server. I would say out of 100 clicks on my site, I received this message after 3 of those clicks, and can't find any real consistency behind it. It only happens when clicking buttons that are page redirects using the code...Response.Redirect("Example.aspx"). If I refresh the browser, the page that I was supposed to be redirected to loads fine.

The app is running on Windows SBS 2003. The full error message that I receive is show below.


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 -->

<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 <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->

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



Thanks in advance for your help,
Chris
SOLUTION
Avatar of gregoryyoung
gregoryyoung
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
DO NOT DO THE ABOVE IF THIS IS A PRODUCTION SYSTEM

it will show your source code and full error traces to your users

the way I outline will give you the same information on ALL errors not just the ones you are getting but the ones your users are getting as well.
If atsci makes 100 tests, it's probably not a production server. Sending e-mails for an error is not the best test and debug solution, so during development it's difficult to use
I am just making sure that bases are coverred ... I error on the side of safety ...

you are correct on a development system its better to show the error but I certainly would not tell someone to do that without adding the production caveat .
Avatar of atsci
atsci

ASKER

I appreciate the answers, but the error handling isn't really what I'm concerned with. These errors can come up when the user is simply clicking a button that redirects you to another page. It is not passing any values or anything. It's pretty much just a hyperlink.

I believe it could be a server error related to IIS. I found this article in the MS Knowledge base that talks about this problem for servers with IIS6 and Sharepoint on the same machine. I'm not sure if its the issue...I wanted to get some feedback from other sources before I start screwing around with our server. Especially because the error message is not identical to the one described by MS. Here is the link...

http://support.microsoft.com/default.aspx?scid=kb;EN-US;823379
Any errors will show up like this ...

example ... go into your code and on a page load just put in "throw new System.Exception("test")"

it will show up with the same message you are getting now.

do one of the above things to find out what the error you are getting actually is ...

The error could be in the processing of the next page. Or in viewstate being invalid etc etc.

then solving it becomes much easier.

Avatar of atsci

ASKER

Thanks for the help. It turns out the errors were/are related to general network errors.