Msxml3.dll error "800c0005" SOLUTION

Source: Internet
Author: User

Using the XMLHTTP component Program The system will encounter the msxml3.dll error '800c0005 '. The specified resource is not found. "There are many reasons for this error on the Internet, generally because of the firewall or UDP Port permissions, and the corresponding solutions. Others may not. In fact, the main cause of the error is "the system does not find the specified resource ". This error occurs when the open method of the XMLHTTP component is called and then the send method is used. When the URL parameters of the open method cannot be accessed, the error 8000005 is returned. Once such an error occurs, the application will be terminated and the operation cannot be continued. Most of the programs are written as follows:
Function functionname (pararm ...)
Dim HTTP
Set HTTP = server. Createobject ("msxml2.xmlhttp. 4.0 ")
With HTTP
. Open "get", httpurl, false
. Send
End
If HTTP. readystate <> 4 then
Set HTTP = nothing
......
Exit Function
End if
End Function
Most programs use the readystate attribute of XMLHTTP to determine the returned status from the server. In fact, this may not be suitable. In many cases, errors in the program flow cannot be detected by using the readystate attribute. When an error occurs, the program will still be terminated. Actually, modify the above Code You can skip the errors encountered during program execution so that the program continues to run. The modification code is as follows:
Function functionname (pararm ...)
Dim HTTP
Set HTTP = server. Createobject ("msxml2.xmlhttp. 4.0 ")
With HTTP
. Open "get", httpurl, false
. Send
End
On Error resume next
If HTTP. Status <> 200 then
Set HTTP = nothing
......
Exit Function
End if
End Function
When the send method produces an error, the value of readystate may be 4, but the return value of status must not be 200. Haha, I have tracked readystate and status many times and it is worth the previous results. There may be errors. I have not found them yet.
Hope the above program solution can help you !! If you have a better solution, please let me know.
I use msxml2.xmlhttp. 4.0 as an example to describe the program and it is also suitable for XMLHTTP components of other versions. To check which versions of XMLHTTP components have been installed in your system, go to hkey_classes_root in the registry.

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.