Troubleshoot ASP Problems

The following table lists and provides possible solutions for common errors related to ASP. For more information on ASP, visit



Active Server Pages error 'ASP 0140'

Page Command Out Of Order

/index.asp, line 58

The @ command must be the first command within the Active Server Page.

Cause: <%@ LANGUAGE="VBSCRIPT" %> is not placed on the first line of the page.

Solution: Move this line of code to the first line, or delete if you are using VBSCRIPT since it's the default.



Microsoft VBScript runtime error '800a000d'

Type mismatch: 'cINT'

/temp/error.asp, line 13

Cause: You are trying to convert a non-numeric variable into an integer.

Solution: Make sure the variable is numeric.

Use If IsNumeric( ) function to validate first.



Microsoft VBScript runtime error '800a0006'

Overflow: 'cINT'

/temp/error.asp, line 14

Cause: cINT limitation causes this error. The range of numbers that cINT can convert is between -32,768 to 32,767

Solution: Use INT() if possible.



Microsoft VBScript runtime error '800a000d'

Type mismatch: 'SelectErrorCate'

/error.asp, line 24

Cause: You are trying to call a function or sub which does not exist.

Solution: Create the function/sub and includes it in your page. Check for spelling errors.



Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment: 'SelectErrorCate'

/error.asp, line 20

Cause: You are trying to call a function or sub with incorrect number of arguments.

Solution: Make sure you have all the arguments for the function/sub, separated by commas.



Microsoft VBScript compilation error '800a03f6'

Expected 'End'

/error.asp, line 112

Cause: You are missing an End If statement

Solution: Check your IF statement logic and make sure you didn't miss the End If.



Response object error 'ASP 0156 : 80004005'

Header Error

/temp/error.asp, line 10

The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.

Cause: Response.Redirect command is issued after HTTP header has already been written.

Solution: First, move the Response.Redirect line above tag. Then, add it to the top of the page.



ERROR: HTTP Error 400

400 Bad Request

Due to malformed syntax, the request could not be understood by the server. The client should not repeat the request without modifications.

Cause: Query String (the parameters attached to an ASP file: test.asp?id=3&Type=book) contains invalid data. This error happens in Netscape only.

Solution: Apply Server.URLEncode function to convert all query string parameters to URL Encoded codes.