Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute:

IIS 7.5 , 2008rc2, classic asp, 500 error msg:

The page cannot be displayed because an internal server error has occurred.

I need to know how to configure IIS to get a more detailed error.
I've tried setting to true all of debugging options in the ASP configuration.
But that didn't work. Can anyone help me?

share|improve this question
    
I am using different way to log error in text file: stackoverflow.com/questions/20475502/… Main difference -- error informatin will be stored in text file – Zam Oct 5 at 14:14

9 Answers 9

up vote 122 down vote accepted

I have come to the same problem and fixed the same way as Alex K.

So if "Send Errors To Browser" is not working set also this:

Error Pages -> 500 -> Edit Feature Settings -> "Detailed Errors"

enter image description here

Also note that if the content of the error page sent back is quite short and you're using IE, IE will happily ignore the useful content sent back by the server and show you its own generic error page instead. You can turn this off in IE's options, or use a different browser.

share|improve this answer
6  
Error Pages -> 500 -> Edit Feature Settings -> "Detailed Error" Thanks!!!!! – Pablo Martinez May 11 '12 at 12:55
5  
If it's still not working, disable friendly http error messages – Tim Partridge Feb 22 '13 at 18:53
    
If "Error Pages" is missing from your panel, ensure the feature is enabled: Turn Windows features on or off => WWW Services, Common HTTP Features, [x] HTTP Errors – fiat Feb 7 '14 at 3:53
    
@fiat To enable "Error Pages", I had to go: Turn Windows features on or off > Internet Information Services > World Wide Web Services > Common HTTP Features > [✓] HTTP Errors. – Jess Telford Nov 10 at 23:09
    
Note: "Error Pages" and ".NET Error Pages" are different. You specifically want "Error Pages". – Jess Telford Nov 10 at 23:10

If you're on a remote server you can configure your web.config file like so:

<configuration>
<system.webServer>
    <httpErrors errorMode="Detailed" />
    <asp scriptErrorSentToBrowser="true"/>
</system.webServer>
<system.web>
    <customErrors mode="Off"/>
    <compilation debug="true"/>
</system.web>

share|improve this answer
1  
Actually, the <system.webserver> settings were sufficient in my case, thanks. – marapet Feb 15 '11 at 8:46
2  
The system.webServer section is read by IIS 7+ even when running classic ASP – Tim Lewis Oct 25 '13 at 18:57
    
customErrors mode="Off" did it for me – spankmaster79 Feb 10 at 14:07
    
it is no longer necessary to use customErrors (for eg IIS 7+ , ASP.NET, Classic AppPool) tedgustaf.com/blog/2011/5/… – Kiquenet Oct 6 at 19:27

Double click "ASP" in the sites Home screen in IIS admin, expand "Debugging Properties" and enable "Send errors to browser" and click "Apply"

Under "Error Pages" on the home screen select "500", then "Edit feature settings" and select "Detailed Errors".

Too, Applies to Windows Server 2012 with IIS 8.0

share|improve this answer
    
Maybe applies to IIS 7.5 , Windows 2008 R2, ASP.NET 4.5.1 (WebForms) with CLASSIC AppPool (NOT integrated) – Kiquenet Oct 6 at 19:25

After trying Vaclav's and Alex's answer, I still had to disable "Show friendly HTTP error messages" in IE

enter image description here

share|improve this answer

try setting the value of the "existingResponse" httpErrors attribute to "PassThrough". Mine was set at "Replace" which was causing the YSOD not to display.

<httpErrors errorMode="Detailed" existingResponse="PassThrough">
share|improve this answer
    
customErrors are for asp.net. httpErrors are for IIS7, and so handle content that doesn't go through the .net handler (e.g. .png, .js etc.) If you want error pages for non-.net content types, use IIS error pages (httpErrors for IIS7, the UI for IIS6.) The customErrors attribute is used when the .net code is throwing an exception (404, 403, 500 etc) and the httpErrors attribute is used when IIS itself is throwing an exception. This is because by default IIS7 intercepts HTTP status codes such as 4xx and 5xx generated by applications further up the pipeline. – Kiquenet Oct 6 at 19:29

One thing nobody's mentioned is as a very quick and temporary fix, you can view the error on the localhost of that web server.

share|improve this answer
1  
That's if the third option visible in Vaclav's answer is selected. – ricksmt Apr 8 '14 at 15:30

In web.config under

<system.webServer>

replace (or add) the line

<httpErrors errorMode="Detailed"></httpErrors>

with

<httpErrors existingResponse="PassThrough" errorMode="Detailed"></httpErrors>

This is because by default IIS7 intercepts HTTP status codes such as 4xx and 5xx generated by applications further up the pipeline.

Next, enable "Send Errors to Browser" under the "ASP" section, and under "Error Pages / Edit Feature Settings", select "Detailed errors".

Also, give Write permissions on the website folder to the IIS_IUSRS builtin group.

share|improve this answer

You may also verify that if you changed your main website folder (c:\inetpub\wwwroot) to another folder you must give read permission to the IIS_USERS group in the new folder.

share|improve this answer

Found it.

http://blogs.iis.net/ksingla/archive/2009/02/16/iis-7-5-updates-to-custom-errors-and-compression.aspx

run cmd as administrator, go to your system32\inetsrv folder and execute:

appcmd.exe set config -section:system.webServer/httpErrors -allowAbsolutePathsWhenDelegated:true

Now I can see detailed asp errors .

share|improve this answer

protected by Community Feb 12 at 8:43

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.