精華區beta Visual_Basic 關於我們 聯絡資訊
狀況: 呼叫 Web Service 出現 HTTP 狀態 417 Expectation Failed 原因: Server 收到無法識別的標頭(不太了解其中原因) 解決方案1: 瀏覽器的 proxy 設定關閉 解決方案2: 瀏覽器的 proxy 設定中的例外,輸入 Web Service 的伺服器位址或網域名稱 解決方案3: 在 Web.config 的 <configuration> 區段中加入以下設定 <system.net> <settings> <servicePointManager expect100Continue="false" /> </settings> </system.net> 解決方案4: 呼叫 Web Service 前加入以下程式碼: System.Net.ServicePointManager.Expect100Continue = false 參考資料: http://dev.pete.tw/2010/10/get-http417-when-calling-web-service.html 備註:實測解決方案3 無效,4未實測,1或2才解決問題 -- ▃▅▇▆▄ ▆▂▃ ` 逝去感如何能留住,半點遺留殊不易,██▅▇▄▃ ▇▃▂" . █████████▃i ▁▄▇ 更多悽悽慘慘的遭遇………██▆▃ █▅▆▃ˍ▄* ▂█▄▇▅▂. 我不知道,王~八~蛋~~! ▂▆███ █▄▃ 。fumizuki。Check。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.194.229.179