1. 程式人生 > >[問題解決](Windows Server 2012 R2)WCF, Web Service 部署在(Windows Server 2012 R2)IIS上,調用時返回FaultException,在瀏覽器上點擊 Web Service的Hello方法,顯示500錯誤。

[問題解決](Windows Server 2012 R2)WCF, Web Service 部署在(Windows Server 2012 R2)IIS上,調用時返回FaultException,在瀏覽器上點擊 Web Service的Hello方法,顯示500錯誤。

exce 錯誤信息 prot 問題 httppost sys localhost protoc config

解決方法:

1.把WCF改成Web Service;

2.在Web.config中,在<system.web>裏面加上  

<webServices>

<protocols>

<add name="HttpPost" />

<add name="HttpGet" />

<add name="HttpPostLocalhost" />
</protocols>

</webServices>

3.刷新Windows Server的瀏覽器,點擊 Web Service的Hello方法,就會返回具體的錯誤信息了。

[問題解決](Windows Server 2012 R2)WCF, Web Service 部署在(Windows Server 2012 R2)IIS上,調用時返回FaultException,在瀏覽器上點擊 Web Service的Hello方法,顯示500錯誤。