2010-01-20 51 views
0

這是腳本。嘗試自己執行... nada。試圖通過任務調度程序執行... nada。如果我通過IE瀏覽器下面的網址,它就可以工作。有任何想法嗎???通過.vbs腳本呼叫https頁面失敗...爲什麼?

''//Force the script to finish on an error. 
On Error Resume Next 

''//Declare variables 
Dim objRequest 
Dim URL 

Set objRequest = CreateObject("Microsoft.XMLHTTP") 

''//Put together the URL link appending the Variables. 
URL = "https://myurlhere.com" 

''//Open the HTTP request and pass the URL to the objRequest object 
objRequest.open "GET", URL , false 

''//Send the HTML Request 
objRequest.Send 

''//Set the object to nothing 
Set objRequest = Nothing 

回答

0

問題是,該頁面需要Windows身份驗證,即使該腳本是作爲已通過身份驗證的用戶運行的......由於在詢問時未響應用戶名和密碼而導致失敗。

解決方案: *啓用匿名身份驗證 *更新web.config文件,以便通知控制器並不需要身份驗證的用戶

+0

關閉Windows身份驗證並不是真正的答案。 假設你的網站有一個原因打開它! – 2017-01-13 20:07:17