Asked  6 Months ago    Answers:  5   Viewed   38 times

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?

 Answers

39

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.

Tuesday, June 1, 2021
 
joostvandriel
answered 6 Months ago
38

ASP.NET 4 was not registered in IIS. Had to run the following command in the command line/run

32bit (x86) Windows

%windir%Microsoft.NETFrameworkv4.0.30319aspnet_regiis.exe -ir

64bit (x64) Windows

%windir%Microsoft.NETFramework64v4.0.30319aspnet_regiis.exe -ir

Note from David Murdoch's comment:

That the .net version has changed since this Answer was posted. Check which version of the framework is in the %windir%Microsoft.NETFramework64 directory and change the command accordingly before running (it is currently v4.0.30319)

Tuesday, June 1, 2021
 
DMTintner
answered 6 Months ago
72

Change your catch to be catch (Exception ex) and you can then use Response.Write(ex.Message)

Ideally, you would have different catches for different exception types. This is a bucket approach to catching all exceptions.

Tuesday, August 24, 2021
 
MassiveAttack
answered 3 Months ago
39

For those having the same problem, here's two possible solution.

  • 1) Disabling IPv6 support in Firefox (only for Firefox)

Most of the authors that I found out about suggest this approach as quickest and cleanest solution. What you need to do is basically to open configuration settings in Firefox (about:config) and to change network.dns.disableIPv6 setting to true.

  • 2) Change localhost settings in your hosts file (all browsers)

This came to me as an idea to check where and how can I interfere in IPv6 settings on my machine. I saw one of the comments on above mentioned sources saying that one can get rid of the problem by simply replacing localhost with machine name in the url.

It didn’t take me long to check and see that disabling my IPv6 localhost lookup does the same thing as disabling IPv6 directly in Firefox.

What you need to do is basically to comment / delete this particular line in your hosts file:

#::1             localhost

Note: ::1 notation is IPv6 equivalent of the IPv4 127.0.0.1 lookup address.

I believe the second solution might be more suitable for users who do not want to disable IPv6 in general, and the first one for all others that still do not use IPv6 in their regular work.

Saturday, September 11, 2021
 
Alexander Trauzzi
answered 3 Months ago
13

I eventually found out that this was caused by the application sending GZipped contents without the header that indicated to the browser that is was in fact GZipped, so it just dumped the binary content out. I got round this by adding the following to my Global.asax

Sub Application_Error()
    Response.Filter = Nothing
End Sub

This will strip the filter out of the response when an error occurs, and my error message appears.

All credit to Rick Strahl with this blog post for the workaround. It's not ideal but it works for me and that's all I am really bothered about right now.

Friday, November 26, 2021
 
shaikh
answered 4 Days ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :  
Share