【发布时间】:2019-03-25 15:00:12
【问题描述】:
当我使用 Live WCF 服务时,它显示错误
没有可以接受消息的端点监听。这通常是由不正确的地址或 SOAP 操作引起的
【问题讨论】:
标签: c# asp.net wcf soap wcf-endpoint
当我使用 Live WCF 服务时,它显示错误
没有可以接受消息的端点监听。这通常是由不正确的地址或 SOAP 操作引起的
【问题讨论】:
标签: c# asp.net wcf soap wcf-endpoint
将您的端点配置放在项目根目录的Web.config 上。
这是web.config 和end-point 的示例。
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="TransportSecurity">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="TestWcfHttps1.Service1" name="TestWcfHttps1.Service1">
<endpoint address="https://MYSERVER/GpTest/Service1.svc"
binding="basicHttpBinding"
bindingConfiguration="TransportSecurity"
contract="TestWcfHttps1.IService1">
<identity>
<dns value="" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="TestWcfHttps1.Service1">
<serviceMetadata httpsGetEnabled="true" externalMetadataLocation="https://MYSERVER//GpTest/Service1.wsdl" />
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
上面的示例代码将解决您的问题,但请在您的解决方案中描述更多关于您的项目并将您的代码放在这里。您是否在类库中使用了web-service 并在您的网络应用项目中引用它?
【讨论】: