2

我已经在 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>

请告诉我任何解决方法。

4

1 回答 1

0

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

  <endpoint address="http://localhost:57800/Services.svc" binding="basicHttpBinding"
            bindingConfiguration="BasicHttpBinding_IServices"     contract="MYServices.IServices"
            name="BasicHttpBinding_IServices" />
于 2012-06-28T21:57:08.883 回答