我遇到的msxml3.dll拒绝访问的解决办法,记录下来

 在调试ASP程序生成静态页面的时候遇到了这个错误,以前也遇到,解决后没记下来忘了,这次又遇到,在网上查到的办法都不适合我这种情况,没有解决,我放在FAT32分区里,最后发现是因为用的虚拟目录,没有直接把IIS的默认网站设置为要调试的网站,然后在目录安全里启用匿名访问,就解决了

msxml3.dll拒绝访问是怎么回事?

12-11

ASP中读取,写入XML文件。读取信息正常,可是保存时出错:rn--error info---------------------------------------------rn技术信息(用于支持人员)rnrn错误类型:rnmsxml3.dll (0x80070005)rn拒绝访问。 rn/myasp/add_News.asp, 第 120 行rnrnrn浏览器类型:rnMozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) rnrn网页:rnPOST 64 ??? /myasp/add_News.asprnrnPOST Data:rnid=a&LanguageName=a&LanguageValue=&LanguageImages=&Submit=Submit rnrn时间:rn2005年12月11日, 18:03:45 rnrnrn详细信息:rnMicrosoft 支持 rn--error info---------------------------------------------rnrnASP代码如下:rn Dim strIDrn Dim strLanguageNamern Dim strLanguageValuern Dim strLanguageImagesrn rn strID = Request.Form("id")rn strLanguageName = Request.Form("LanguageName")rn strLanguageValue = Request.Form("LanguageValue")rn strLanguageImages = Request.Form("LanguageImages")rn rn Dim objXMLrn Dim objEntryrn Dim objIDrn Dim objLanguageNamern Dim objLanguageValuern Dim objLanguageImagesrn rn Set objXML = server.createObject("Msxml2.DOMDocument")rn objXML.async = falsern objXML.load(server.MapPath("language.xml"))rn rn Set objEntry = objXML.createNode("element", "language", "")rn objXML.documentElement.appendChild(objEntry)rn rn Set objID = objXML.createNode("element", "ID", "")rn objEntry.appendChild(objID)rn objID.text = strIDrn rn Set objLanguageName = objXML.createNode("element", "LanguageName", "")rn objEntry.appendChild(objLanguageName)rn objLanguageName.text = strLanguageNamern rn Set objLanguageValue = objXML.createNode("element", "LanguageValue", "")rn objEntry.appendChild(objLanguageValue)rn objLanguageValue.text = strLanguageValuern rn Set objLanguageImages = objXML.createNode("element", "LanguageImages", "")rn objEntry.appendChild(objLanguageImages)rn objLanguageImages.text = strLanguageImagesrn rn objXML.save(server.MapPath("language.xml")) --错误产生的地方rn

msxml3.dll报错,拒绝访问.

05-27

已经试过了以下方法,无果;rn1、分别从IIS和文件夹两个方向增加写的权限;rn2、下载MSXML4,注册MSXML2、3、6,并修改权限;rn3、替换“MSXML2.DOMDocument”为3.0或4.0.rnrnrnrn[code=VBScript]<%Set Rs = Server.CreateObject("ADODB.RecordSet") rnSql = "SELECT count(id) as num,name FROM table group by name" rnRs.Open Sql,Conn,1,1 '以只读方式查询数据记录 rnIf Rs.Eof Then rn Response.Write "Sorry,no record!" '如果没有记录 rnElse rn Dim objXMLDOM, objRootNode, objNode rn Set objXMLDOM = Server.CreateObject("MSXML2.DOMDocument") '创建XML文档对象 rn Set objRootNode = objXMLDOM.createElement("xml") '创建根节点 rn objXMLDOM.documentElement = objRootNode rnrn Do While Not Rs.Eof '循环出所有记录 rn' Response.Write Rs("germ_name") &" " rn Set objRowNode = objXMLDOM.createElement("row") '创建父节点 rn Set objNode = objXMLDOM.createElement("name") '创建子节点 rn objNode.text = Rs("name") rn objRowNode.appendChild(objNode) rn rn Set objNode = objXMLDOM.createElement("num") rn objNode.text = Rs("num") rn objRowNode.appendChild(objNode) rn rn rn objRootNode.appendChild(objRowNode) rn Rs.MoveNext:Loop '循环结束 rn objXMLDOM.Save "MyXMLDoc.xml" '写入XML文件 可以用变量让用户在页面上自定义文件名'///////////此处提示错误rn Response.Write " " rn Set objNode = Nothing '销毁对象 rn Set objRowNode = Nothing '销毁对象 rn Set objRootNode = Nothing '销毁对象 rnEnd If rnRs.Close rnSet Rs = Nothing rnrn%>[/code]

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试

关闭