I inherited a classic ASP project and and have deployed it on a IIS 7.5. I am able to access the site, however at certain point I get a generic 500 error page. I want to know what is going on, so I think the best is to see the logs
For the record, I am a newbie with IIS/ASP so the question can sound a bit silly.. Thanks for any suggestion!
You should install the HTTP Errors feature in IIS. This is enough to view the error message -- you won't need logging.
To install HTTP Errors:
Once installed, configure IIS to show detailed error messages:
You should now see detailed error messages.
IIS logs won't help you because they do not include the detailed error messages.
This will write the error info to the screen. Modify the "If blnLogFailure" section if you want to write to a file.
On Error Resume Next
Set objASPError = Server.GetLastError
blnLogFailure = TRUE
myMessage = "ERROR IN PROCESSING: " & objASPError.File & vbCrLf
myMessage = myMessage & "ASP Code: " & objASPError.ASPCode & vbCrLf
myMessage = myMessage & "Number: " & objASPError.Number & vbCrLf
myMessage = myMessage & "Source: " & objASPError.Source & vbCrLf
myMessage = myMessage & "Line Number: " & objASPError.Line & vbCrLf
myMessage = myMessage & "Description: " & objASPError.Description & vbCrLf
myMessage = myMessage & "ASP Description: " & objASPError.ASPDescription & vbCrLf
for each item in Request.ServerVariables
myMessage = myMessage & "ITEM: " & item & " VALUE: " & Request.ServerVariables(item) & vbCrLf
next
If blnLogFailure Then
Response.Write myMessage
End If
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With