Msxml3.dll error '000000' error. Access denied Error

Source: Internet
Author: User
When collecting a website yesterday Program Error.
It is a self-written collection program.
After searching, some useless results were found. Later, msxml2.serverxmlhttp was replaced with msxml2.xmlhttp, and the problem was solved successfully.
The following describes the troubleshooting process.
The collection fails for a period of time. The specified resource fails to be downloaded or the access is denied.
Later, access was denied.

At the beginning, I thought that the opposite server had configured anti-collection settings, such as time restrictions.

Therefore, the program is changed. The list page is obtained directly, and then obtained continuously.ArticleList. Changed the collection file structure,
It turns out that a file, class, database connection, and data processing are all stored in one file. When a document is collected, a time loop is added in the next day. Wait for 5 seconds.CodeAs follows:
Stime = timer ()
Dtime = timer ()-stime
Do While dtime <5
Dtime = timer ()-stime
Loop

It does wait five seconds, but soon we found that this cycle is too consuming CPU resources. Once this cycle reaches, the CPU usage continued to reach 100%, so we immediately gave up this solution.
Another file is created. Only captures the content of the article based on the article URL and writes it to the database. After the writing is completed, the code is automatically redirected.
The core idea is to use <meta http-equiv = "refresh" content = "5; url = someurl. asp">
This is a timed jump code, and I believe everyone is familiar with it.
My principle is to use the first file to capture the connection addresses of all articles and related Navigation Code and save them to the database.
Then, we use a new program to capture the content of the article, read the database records, and collect data one by one.
The database record has a flag, tinyint type. The default value is 0. The collection is successfully updated to 1, and the failure is updated to 2.
In this way, each time a piece of uncollected data is read from the database, that is, the data with flag = 0 is read and operated. After the operation is completed, wait 5 seconds to jump to itself.

The ideas and ideas are good. The article URL database is also ready for collection. An error occurred while collecting the specific content of the article. Always msxml3.dll error '123'
Access denied error.
That is depressing. I want to open a machine for one night, automatically collect the machine, and burst the machine.
This morning, I searched for information, and most of the information I found was useless information.
Basically, permission issues occur.

Msxml3.dll error ''' 80070005 ''''

Access denied.

Solution:

Grant the Internet Guest Account (iusr_web) to write to the folder where the program is located.

Practice:

Select cachefile-properties-security-add (iusr_web)-write
That's all. Inexplicably, my FAT32 does not have the security permission problem in the NTFS format, and the IIS settings are also normal,
My problem is that access is denied when collecting part of the data. This is definitely not the problem.
Continue searching and find another solution: replace Microsoft. XMLHTTP with msxml2.xmlhttp. I used msxml2.xmlhttp
Continue searching. The final solution should be msxml2.serverxmlhttp
This result was also found previously. Due to carelessness, I did not notice it in time. The following are useful information found during the search process.

The Code is as follows:
Posturl = http://www.xxx.com/
Server. scripttimeout = 20
Set oxmlhttp = Createobject ("Microsoft. XMLHTTP ")
Call oxmlhttp. Open ("get", posturl, false)
Call oxmlhttp. Send ("")
Shtmlstr = oxmlhttp. responsebody
Set oxmlhttp = nothing

It is preliminarily determined that there may be a jump reason for the opened page. The solution is to use
Msxml2.serverxmlhttp
Replace
Microsoft. XMLHTTP
.

In addition, we found such a piece of code on csdn.
Serverurl = posturl
Set mail1 = server. Createobject ("CDO. Message ")
Mail1.createmhtmlbody serverurl, 31
AA = mail1.htmlbody
Set mail1 = nothing
Response. Write AA

You can also try it. Copy it to favorites.

<%
'Define variables
Dim objxmlhttp
Dim strhtml

 

'This is a stable version in msxml3.0.
'Use msxml2.serverxmlhttp, not msxml2.xmlhttp
Set objxmlhttp = server. Createobject ("msxml2.serverxmlhttp ")

'If you find the following errors
'Msxml3.dll error' 80070005'
'Access is denied.
'It may be that an error occurs when a proxy is used for Internet access.
'Use proxycmd.exe tool .:
'
'Proxycfg-d
'Check whether proxy is used for Internet access
'Can also see this post: http://www.asp101.com/forum/display_message.asp? Medium = 51841
'

'The version is too old and unstable.
'Set objxmlhttp = server. Createobject ("msxml2.xmlhttp ")

'Now let's start sending the request.
'To use Microsoft, initialize a request and specify the method (get, post, etc.) for the request ),
'Url, and permission verification information (user name, password, and so on ).
'Format:
'. Open (bstrmethod, bstrurl, basync, bstruser, bstrpassword)
'Objxmlhttp. Open "get", "http://www.yahoo.com", false
Objxmlhttp. Open "get", "http://www.yahoo.com", false

'Send the request directly.
Objxmlhttp. Send

'Print return status:
Response. Write "status:" & objxmlhttp. Status &""_
& Objxmlhttp. statustext & "<br/>"

'Get the text returned by the response.
'The object is used to operate XML, so it has the following attributes:
'Responsebody, responsestream, and responsexml.
'But now we only need text information
Strhtml = objxmlhttp. responsetext

'But when this object instance is no longer in use, you need to clear this object instance.
Set objxmlhttp = nothinG

'All we have to do now is display the HTML we have obtained.
'First, let's look at the effect explained by the browser.
'And the source code is displayed.
'The following is similar to
%>

<H1> here's the page: <Table border = "1" bgcolor = "# ffffff">
<Tr> <TD>
<% = Strhtml %>
</TD> </tr>
</Table>

<Br/>

<H1> here's the code: <Table border = "1" bgcolor = "# ffffff">
<Tr> <TD>
<PRE>

<% = Server. htmlencode (strhtml) %>
</PRE>
</TD> </tr>
</Table>

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.