Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display ASP error in browser, NOT http 500 error 1

Status
Not open for further replies.

XgrinderX

Programmer
Mar 27, 2001
225
US
Isn't there a setting in IIS that will allow it to display the actual ASP error message to the browser instead of just giving the HTTP 500 Page cannot be displayed error?

We have an old IIS server that does this, but the new one we set up just gives the HTTP 500 error and this makes it hard for debugging. We want to see the error message.

Any ideas?

-Greg
 
ON ERROR RESUME NEXT

your code goes here

IF err.number <> 0 THEN
response.write &quot;Number: &quot;& err.number &&quot;<P>&quot;
response.write &quot;Description: &quot;& err.Description &&quot;<P>&quot;
response.write &quot;Source: &quot;& err.Source &&quot;<P>&quot;
err.Clear
End If
 
you can also set your browser to not display friendly msgs Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
Go to your IE browser. Tools >> internet options >> advanced >> check out display friendly Http error message.
you'll get it.

Cheers !

Ted
 
I guess I should be more specific. We have a few older IIS servers that someone else set up. If we get an ASP error on those pages, the error message is displayed to the browser, just as if we had used the ON ERROR statement. But we don't have to use the ON ERROR statement, the error messages just appear in the browser with line number and everything.

On our new IIS server, it does not do this. Instead all we get is a HTTP 500 error. We would like our new IIS server to work the same way the others do, but we are not IIS experts and don't know what to do.

Yes we could use the ON ERROR statements, but we prefer the way the other servers operate.

Thanks.
 
OK...you guys reply to fast! ;)

My first reply was being written while you guys wrote in about the friendly HTTP message deal. I went to the options like you said, and unchecked that box and it works great.

That still doesn't explain why the 2 servers operate differently, but oh well. At least I got what I needed!

THANKS!!

-Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top