1
如果從控制檯運行,但在使用PowerShell ISE運行時,以下代碼自行工作,但在兩次運行後失敗並返回Exception calling "GetResponse" with "0" argument(s): "The operation has timed out"
。必須重新啓動ISE才能再次運行它。PowerShell ISE WebRequest在多次調用後失敗
$req = [System.Net.WebRequest]::CreateHttp("http://stackoverflow.com/")
$req.Timeout = 500
$req.GetResponse()
這是什麼限制,是否有辦法消除限制?
甜!這解決了這個問題。謝謝! – user1589188