ASP: When request.cookies occurs, the Microsoft VBScript runtime error (0x800a000d) type does not match: ' [string:

Source: Internet
Author: User

Yesterday when a customer told me that I didn't see the picture when I logged in, I didn't believe it, because my browser test found everything to be OK.

Through the QQ Remote Assistance, I only found the server side really error:

Microsoft VBScript Run-time error (0X800A000D)
Type mismatch: ' [string: ' '] '

Check the code and find the error line:

If Request.Cookies ("name") = 1 Then

Strange, why does my browser run without error, after analysis, originally his browser disabled cookies.

Causes the value of Request.Cookies ("name") to be empty.

When the value of a cookie is empty, you cannot use an expression such as =1, but instead use = "1" and Correct the code:

If Request.Cookies ("name") = "1" Then

Conclusion: All cookies read in the program should be compared by string type, so it is safe.

2010-02-02

ASP: When request.cookies occurs, the Microsoft VBScript runtime error (0x800a000d) type does not match: ' [string:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.