The test form is only available for requests from the local machine 解決方法


 

 

protocolsdocumentationsoapweb

當您嘗試從遠程計算機訪問 Web 服務時,不會顯示“調用”按鈕。並且,您會收到以下錯誤信息:

The test form is only available for requests from the local machine


解決方法:
1.通過編輯 Web 服務所在的 vroot 的 Web.config 文件,可以啟用 HTTP GET 和 HTTP POST。以下配置同時啟用了 HTTP GET 和 HTTP POST:
<configuration>
    <system.web>
    <webServices>
        <protocols>
            <add name="HttpGet"/>
            <add name="HttpPost"/>
        </protocols>
    </webServices>
    </system.web>
</configuration>

2.通過編輯 Machine.config 中的 <protocols> 節為計算機上的所有 Web 服務啟用這些協議。下面的示例啟用了 HTTP GET、HTTP POST 及 SOAP,此外還從本地主機啟用了 HTTP POST:

<protocols>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="HttpPostLocalhost"/>
<!-- Documentation enables the documentation/test pages -->
<add name="Documentation"/>
</protocols>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM