答案 0 :(得分:1)
我坦率地承认我并没有真正尝试重现你的具体错误,但我注意到了一些我经常弄错的东西。
Colin Cole在博客中发表了关于使用SSL的cap.xml格式的细微变化。 我没有使用SSL,但只有在我改变了
<allow-from http-request-headers="*">
<domain uri="*"/>
</allow-from>
到
<allow-from http-request-headers="*">
<domain uri="http://*" />
<domain uri="https://*" /> <!-- if needed -->
</allow-from>
访问该服务。
答案 1 :(得分:0)
我必须对ServiceReferences.ClientConfig文件进行以下更改,然后再次发布:
<configuration>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="CustomBinding_Service1">
<binaryMessageEncoding />
<httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://localhost/Service1.svc" binding="customBinding"
bindingConfiguration="CustomBinding_Service1" contract="ServiceReference1.Service1"
name="CustomBinding_Service1" />
<!--<endpoint address="http://localhost:2721/Service1.svc" binding="customBinding"
bindingConfiguration="CustomBinding_Service1" contract="ServiceReference1.Service1"
name="CustomBinding_Service1" />-->
</client>
</system.serviceModel>
</configuration>