[英]Relitve path for MSXML2.ServerXMLHTTP.6.0 not working
I have this code which works but I need to stop using http in the string as it sometimes is on a https servers. 我有此代码可以正常工作,但我需要停止在字符串中使用http,因为有时它在https服务器上。 Hence my wish to change it to a relative path eg Url = "../../path/to/file.asp" but when make the change to this code we get this error.
因此,我希望将其更改为相对路径,例如Url =“ ../../path/to/file.asp”,但是当对此代码进行更改时,我们会收到此错误。
msxml6.dll error '80072ee6'
System error: -2147012890.
I am sure I missing something simple. 我肯定我错过了一些简单的事情。 Anybody got any ideas?
有人有想法吗?
Working code fragmant 工作代码fragmant
Url = "http://" & Request.ServerVariables("SERVER_NAME") & "/path/to/file.asp"
Set HttpReq = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
With HttpReq
.Open "POST", Url, false
.setTimeouts 30000, 60000, 30000, 120000
End With
HttpReq.Send (RequestXml)
Yes its been a while I think the fix was to not state the "http://" and let the sever work it out. 是的,已经有一段时间了,我认为解决方法是不声明“ http://”,而让服务器解决。
eg Url = Request.ServerVariables("SERVER_NAME") & "/path/to/file.asp" 例如网址= Request.ServerVariables(“ SERVER_NAME”)&“ /path/to/file.asp”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.