2

For some reason I can't see any useful information about my errors even though I Changed the customerrors section of the web.config:

<customErrors mode="RemoteOnly">
</customErrors>

All I want to do is be able to see the normal yellow screen of death that shows what is going wrong.

Ever since I tried to upload this site on my local developer PC's IIS, the application has not shown error information.

Whenever I start debugging the application fails immediatly and says, "Server Error in '/' Application." and gives me a 404 http error and only displays the Version of the .net framework and asp.net version.

*UPDATE: I'm Running this locally on my development pc.

2 Answers 2

2

Set the Mode to Off instead of remote only. MSDN explains the different modes here:

http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx

If you are in RemoteOnly then it will only show the error if you are running it locally.

Sign up to request clarification or add additional context in comments.

9 Comments

Are you sure you are editing the web.config on the server and not on your dev machine?
dev machine with visual studio 2010. Everything was working fine on before today but I was trying to get it run on my local IIS on windows 7 and something got messed up with it.
Also, make sure that the XML you are editing is not commented out. I believe it is commented out by default, so if you make changes in there with out removing the comments you will see no difference.
Okay now I'm getting the same thing but with an added statement syaing: "The resource cannot be found."
Hrrm, that makes me think you might have something weird in your IIS setup. Has it ever worked since you started using IIS?
|
0
<configuration>  
  <system.web>  
    <compilation debug="true" targetFramework="4.5" />  
    <httpRuntime targetFramework="4.5" />  
    <customErrors mode="" defaultRedirect=""></customErrors>  
  </system.web>  
</configuration>

If you want to set your application level exception should redirect to your custom error page, you can do this by going to global.asax file and write the code for redirection in Application_Error method.

For handling all the exception, you just need to write the code for redirection at catch section. Also you can set custom error page for http errors by passing status code.

<customErrors mode="RemoteOnly" defaultRedirect="~/ErrorPages/Oops.aspx">  
  <error statusCode="404" redirect="~/ErrorPages/404.aspx" />  
</customErrors> 

follow this link:https://stackify.com/web-config-customerrors-asp-net/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.