4

Hope someone can help me. I have tried all of the following solutions:

  • Send error to browser is true
  • Error mode Detailed
  • Enable parents path is true

But still the IIS is loading the file Errors/500.aspx that is in the project folder and I cannot debug the error.

This is my Web.config file. Even if custom error mode is Off it's still loading custom Errors/500.aspx file.

Carlo S
  • 953
  • 1
  • 9
  • 14

1 Answers1

3

Make sure your browser is configured to show errors, like in IE:

  • Turn off the friendly error message option in the browser as follows:
    • In Internet Explorer, on the Tools menu, click Internet Options.
    • On the Advanced tab, under the Browsing section, click to clear the Show friendly HTTP error messages check box, and then click OK.
    • Close the browser.

Turn on detailed errors in IIS.

  • Internet Information Services (IIS) Manager —> Your Web Site —> Error Pages -> Edit Feature Settings -> select "Detailed errors"

Make sure your web.config does not have any nodes like:

<httpErrors>
       <error statusCode="500" path="/somedir/500.asp" responseMode="ExecuteURL" />
</httpErrors>

and

<customErrors mode="RemoteOnly" defaultRedirect="~/404error.aspx" />
Semaphore
  • 184
  • 1
  • 7
  • I'm sorry I did all the following already. After the error I'm always redirected to the file Errors/500.aspx. – Carlo S Jun 28 '16 at 17:25
  • take a look at your web.config, i appended these issues to my answer – Semaphore Jun 28 '16 at 17:35
  • Thanks @Semaphore. I have updated my question with a link to my web.config file. It doesn't contain any of the nodes you outlined. – Carlo S Jun 28 '16 at 17:41
  • 1
    Check your global.asax for any re-directs in it when there is an error. – Semaphore Jun 28 '16 at 17:46
  • And look in your http handler to see if any redirects are happening. I guess you can search the whole solution for "500.aspx". – Semaphore Jun 28 '16 at 17:49
  • Thanks @Semaphore. You lead me to the solution. Actually there was a ErrorsLog.aspx file inside a subfolder that was showing the error. Still don't how the error is routed here, as I didn't write the code, but at least I could debug and solve the issue. – Carlo S Jun 29 '16 at 08:56