enter code here
我的 wcf 服务没有在测试客户端中运行,而是通过浏览器运行,并且当我通过 jquery 获取时
可能有什么问题
错误:无法添加服务。服务元数据可能无法访问。确保您的服务正在运行并公开元数据。
<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>