【发布时间】:2012-05-27 21:09:57
【问题描述】:
我一直在玩通过 SSL 和负载平衡处理 WCF 的乐趣和游戏:(
目前的观点是,我们似乎到达了服务器,但它不喜欢配置中的终点。
谁能给点建议?
客户端配置。
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IWorkflowAPI" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://ourserver.com/API/workflow.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IWorkflowAPI" contract="Warms.IWorkflowAPI"
name="BasicHttpBinding_IWorkflowAPI" />
</client>
</system.serviceModel>
Web 服务网络配置。
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="Originator Secured">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="xx.xx.Web.UI.API.Workflow" behaviorConfiguration="Originator Secured">
<endpoint address="https://ourserver/API/workflow.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IWorkflowAPI" contract="xx.xx.Web.UI.API.IWorkflowAPI"
name="BasicHttpBinding_IWorkflowAPI" listenUri="/" />
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IWorkflowAPI" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<wsHttpBinding>
<binding name="Workflow API Binding">
<security mode="TransportWithMessageCredential">
<transport clientCredentialType="None" />
<message clientCredentialType="UserName" />
</security>
</binding>
</wsHttpBinding>
<customBinding>
<binding name="CustomHttpBinding">
<security allowInsecureTransport="True">
</security>
<httpTransport />
</binding>
</customBinding>
</bindings>
</system.serviceModel>
【问题讨论】:
-
http sniffer, like fiddler 显示了什么?我知道由于 https,您将无法看到内容,但您应该仍然可以看到标题
-
我得到的错误是“在ourserver.com/API/workflow.svc 没有可以接受消息的端点侦听。这通常是由不正确的地址或 SOAP 操作引起的。有关更多详细信息,请参阅 InnerException(如果存在) .
-
内部异常是“远程服务器返回错误:(404)未找到。”
-
客户端和服务器之间的合同是否相同?你能生成一个新的服务引用吗?
-
是的,我可以生成新的服务引用。
标签: wcf web-services https http-status-code-404 wcf-binding