1

I'm running a Windows Server 2012 R12 running IIS8.

I have a classic ASP website running on it, and for the most part it runs fine. The website gets about 1.5 million page views per month (approx 400,000 unique page views).

I have a custom error page for 500.100 script errors, which stores details about the error in a database and sends me an email so I know if a page errors.

I have them set up via this in web.config:

<httpErrors errorMode="Custom" defaultResponseMode="ExecuteURL">
    <remove statusCode="500" subStatusCode="100" />
    <remove statusCode="500" subStatusCode="-1" />
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" path="/error_404.asp" responseMode="ExecuteURL" />
    <error statusCode="500" prefixLanguageFilePath="" path="/error_500.asp" responseMode="ExecuteURL" />
    <error statusCode="500" subStatusCode="100" path="/error_500.asp" responseMode="ExecuteURL" />
</httpErrors>

On the error_500.asp the page includes this code:

On Error Resume Next
Response.Clear
Dim objError
Set objError = Server.GetLastError()

set objError =      Server.getLastError()
strNumber =         objError.AspCode
strSource =         objError.Category
strDesc =           newstr(objError.Description)
strCode =           newstr(objError.Source)
strLine =           ObjError.Line
strASPDesc =        ObjError.ASPDescription
strRemoteAddr =     Request.ServerVariables("REMOTE_ADDR")
ref =               request.servervariables("HTTP_REFERER")
str =               request.servervariables("QUERY_STRING")
cookies =           request.servervariables("HTTP_COOKIE")
ip_url =            strRemoteAddr
ua =                newstr(request.servervariables("HTTP_USER_AGENT"))
totalstring =       objError.File & "?" & str

For some reason, I often get errors like this:

strNumber:
strSource:
strDesc:
strCode:
strLine: 0
strASPDesc:
strRemoteAddr: 98.168.145.166
ref: http://example.com/content/another-page.asp
str: 500;http://example.com/content/this-page.asp
cookies:    ASPSESSIONIDQQRTDDBQ=IBBOMHEDGEEGKAPPLDGLDHLE; _ga=GA1.3.1626071938.1497868025; _gid=GA1.3.629715385.1497868026; _gat=1; __gads=ID=c83d077246e96531:T=1497868028:S=ALNI_MY2v7GwftRZ5EMHIdi_5lEA8TDAgQ
ip_url: 98.168.145.166
ua: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
totalstring: ?500;http://example.com/content/this-page.asp

So I can see the page is erroring, but there is no error message, or line number, or anything else.

I don't know how to find out more about these errors, and wondered if anyone might be able to advise please?

Sometimes I have had up to 10,000 of these all at the same time, which I presume is a hacking attempt, but I am not sure how I can run more detailed debugging etc?

I don't want to log everything on the site as it might fall over if I start doing that, possibly?

Any advice would be much appreciated, as I realise I need to do something to debug or log errors in more detail, but have no idea where to start.

Any advice much appreciated, thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.