2010-03-09 95 views
0

我想通過HTTPS通過傳統的asp訪問soap web服務,但是出現以下錯誤。使XMLHTTP與HTTPS協同工作

MSXML3.DLL錯誤'800c000e'
發生安全問題。

我的代碼:

Function GetASPNetResources()  

Dim returnString 
Dim myXML 
Dim objRequest 
Dim objXMLDoc 
Dim strXmlToSend 
Dim webserviceurl 
Dim webserviceSOAPActionNameSpace 

strXmlToSend = "<some valid xml>" 
webserviceurl = "https://webserviceurl" 
webserviceSOAPActionNameSpace = "appname" 

Set objRequest = Server.createobject("MSXML2.XMLHTTP.3.0") 
objRequest.open "POST", webserviceurl, False 

objRequest.setRequestHeader "Content-Type", "application/soap+xml" 
objRequest.setRequestHeader "CharSet", "utf-8" 
objRequest.setRequestHeader "action", webserviceSOAPActionNameSpace & "GetEstimate" 
objRequest.setRequestHeader "SOAPAction", webserviceSOAPActionNameSpace & "GetEstimate" 

Set objXMLDoc = Server.createobject("MSXML2.DOMDocument.3.0") 

objXMLDoc.loadXml strXmlToSend 

objRequest.Send() 

Response.Write objXMLDoc.load(objRequest.responseXML) 

End Function 

回答

2

你谷歌的錯誤?

SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS = 13056 
objRequest.setOption 2, SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS 
+0

忽略所有證書錯誤真的是個好主意嗎?這意味着與服務器的通信可能不安全 – RobV 2010-03-10 09:48:30

+0

常見問題是供應商證書不符合他們的域名..這是繞過它的唯一方法.. – 2010-03-10 19:56:11

相關問題