【问题标题】:WCF Service End Point Not Found未找到 WCF 服务端点
【发布时间】:2012-06-30 11:29:44
【问题描述】:

我已经在 IIS 上部署了我的 wcf 服务。当我想访问它的一种方法“未找到端点”时,它给了我这个错误,而在本地它对我来说工作正常并返回数据。

这是我的 Web.config 绑定信息

 <system.webServer>
    <directoryBrowse enabled="false" />
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
  <system.serviceModel>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <services>
      <service name="RTAService" behaviorConfiguration="WtfServiceBehaviour">
        <endpoint address="" binding="webHttpBinding" bindingConfiguration="wtfSslBinding" behaviorConfiguration="WebHttpBehaviour" contract="IRTAService" />
        <endpoint address="soap" binding="basicHttpBinding" contract="IRTAService"/>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"  />
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="wtfSslBinding" />
        <binding name="streamedBinding"
                 maxBufferSize="65536"
                 maxReceivedMessageSize="2000000000"
                 transferMode="Streamed">
          <readerQuotas maxDepth="500000000"
         maxArrayLength="500000000" maxBytesPerRead="500000000"
         maxNameTableCharCount="500000000" maxStringContentLength="500000000"/>
          <security mode="None" />
        </binding>

      </webHttpBinding>
    </bindings>
    <behaviors>
      <endpointBehaviors>
        <behavior name="WebHttpBehaviour">
          <webHttp helpEnabled="true" defaultBodyStyle="Wrapped" defaultOutgoingResponseFormat="Json"
            automaticFormatSelectionEnabled="false" />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="WtfServiceBehaviour">
          <serviceDebug includeExceptionDetailInFaults="true" />
          <serviceMetadata httpGetEnabled="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

请告诉我任何解决方法。

【问题讨论】:

  • 您的解决方案中是否有多个 web.config 文件?
  • 您的网络服务器设置是什么(就 SSL 而言)?那 wtfSslBinding 应该提供 SSL 吗?
  • 请分享您收到的实际错误消息。
  • @bluefeet:我没有多个 webconfigs
  • @dtryon:我现在没有为我的服务器配置 ssl。

标签: c# asp.net wcf web-config wcf-binding


【解决方案1】:

我没有看到端点在任何地方定义。你的配置应该是这样的。`

  <endpoint address="http://localhost:57800/Services.svc" binding="basicHttpBinding"
            bindingConfiguration="BasicHttpBinding_IServices"     contract="MYServices.IServices"
            name="BasicHttpBinding_IServices" />

【讨论】:

  • 我想它在那里,就在&lt;service name="RTAService"下面
  • 哦..对不起,我完全错过了那部分。如果可以,请尝试一件事。尝试从您正在部署服务的同一台机器上调用该服务。我这么说的原因在我看来,自从它在您的本地计算机上工作以来,防火墙问题如何。检查您是否在端点中提供了正确的服务器名称。如果可以 ping 通,请尝试 ping 您的部署服务器。也为客户端共享配置文件。
  • 你怎么可能将此标记为答案...你自己的评论否认它。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-12-10
  • 1970-01-01
  • 1970-01-01
  • 2014-06-29
  • 1970-01-01
相关资源
最近更新 更多