What is required for an IIS site to send error details to the browser?
Asked Answered
M

2

13

I am receiving a Server Error on an ASP Classic site running on IIS 7.5.

I have "Send Errors To Browser" set to True, however I still receive the following error screen: 500 - Internal server error.  There is a problem with the resource your are looking for, and it cannot be displayed.

Matthaeus answered 12/6, 2011 at 21:29 Comment(0)
P
17

IIS is hijacking your classic ASP app's response. In your web.config file ensure that the following is configured:

<configuration>
    <system.webServer>
        <httpErrors existingResponse="PassThrough"/>
    </system.webServer>
</configuration>

Also make sure that you've enabled "Send Errors To Browser" in the ASP configuration feature for your site in IIS manager:

enter image description here

enter image description here

Prisage answered 13/6, 2011 at 8:51 Comment(7)
there is no web.config in a Classic ASP site. Should I create one and add that setting?Matthaeus
@Matthaeus - yes. web.config in IIS7.x isn't just specific to ASP.NET. It can be used to config IIS settings as well, such as IIS's custom error handling.Prisage
@Matthaeus - I updated the answer to show exactly what it should look like.Prisage
those are my settings, as I posted in the question. I will create a web.config and get back to you.Matthaeus
@MatthewLock in what way doesn't it work? Why not ask a new question, refer to this one and explain in detail what doesn't work. Also include the relevant configuration info which we know nothing about.Prisage
Fair enough. Will do next time.Little
Perfect solution. I already knew 'Send Erros To Browser', hence it was correctly set. As I was accessing external server, the creation of the 'web.config' AT THE APPLICATION ROOT completed the solution.Pasadis
L
0

In my case my site needed to be an IIS Application, rather than just a virtual directory,

Little answered 5/5, 2013 at 23:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.