About the error message display

zhaozj2021-02-17  56

After the ASP program error, the error tips are not very clear, let people feel the mind, use the following methods to see if there is any help (this method is only suitable for ADO errors)

Step 1, open C: /Winnt/help/iishelp/common/500-100.asp with the editor

Save it as 500-101.asp backup (in order to recover later)

Step 2, cover the following code to the 500-100.asp original file, save the exit

Step 3, create a new file Test.asp, add the following code

<% response.write now (1)%>, deployment

Step 4, enter localhost / test.asp in the browser

500-100.ASP new code: <% @ language = "VBScript"%> <% OPTION Explicit

Const lngmaxformbytes = 200

Dim Objasperror, BLNERRORWRITTEN, STRSERVERNAME, STRSERVERIP, STRREMOTEIPDIM STRMETHOD, LNGPOS, DATNOW, STRQUERYSTRING, STRURL

If Response.buffer thenresponse.clearresponse.status = "500 internal server error" response.contenttype = "text / html" response.expires = 0nd IF

Set objasperror = server.getlasterror%>