enter code here
我的WCF服務沒有在測試客戶端運行,但通過瀏覽器,還運行,當我通過jQuery的獲取WCF服務不是在測試客戶端運行
可能是什麼問題
錯誤: 失敗添加一項服務。服務元數據可能無法訪問。確保您的服務正在運行並展示元數據。
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="SimpleServiceBehavior">
<serviceMetadata httpGetEnabled="True" policyVersion="Policy15" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<webHttpBinding>
<binding name="webHttpBindingWithJsonP" crossDomainScriptAccessEnabled="true" />
</webHttpBinding>
</bindings>
<services>
<service name="WcfService6.Service1">
<endpoint address="" binding="webHttpBinding"
bindingConfiguration="webHttpBindingWithJsonP" contract="WcfService6.IService1"
behaviorConfiguration="webHttpBehavior"/>
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
</service>
</services>
可能的重複[如何設置WCF測試客戶端將運行每次服務運行](https://stackoverflow.com/questions/7805818/how-to-set-that-the-wcf- test-client-will-run-every-time-the-service-is-running) – Volomike
首先,看一看dupe問題,然後注意[this comment](https://stackoverflow.com/a/31223693/105539) 。完成後,請按照[本教程](https://msdn.microsoft.com/en-us/library/bb386386.aspx)進行操作。 – Volomike