当我使用实时WCF服务时,出现错误。
没有端点在此处侦听可以接受该消息。这通常是由于地址或SOAP操作不正确引起的。
当我使用实时WCF服务时,出现错误。
没有端点在此处侦听可以接受该消息。这通常是由于地址或SOAP操作不正确引起的。
将终端点配置放在项目根目录下的 Web.config
文件中。
这是一个带有终端点的 web.config
的示例。
<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
并将其引用到您的 Web 应用程序项目中吗?