This error is occasionally encountered recently, and it is very depressing ~ Msxml4 upgrade is invalid. If you search for it online, it means that the IUSR user with the folder permission cannot solve the problem because it is writable or not used. Then, I finally found a solution to solve the problem.
When you use the XMLHTTP component to write a program, the system will encounter the msxml3.dll error '800c0005 'and 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. In fact, by modifying the code above, you can skip the errors encountered during program execution and continue running the program. 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.
Haha ~ A status <> 200 is added to determine that the problem is resolved.