小编use*_*819的帖子

WCF HttpsGetUrl URI已存在注册

这与其他Stack发布类似,但略有不同,因为我只托管单个wsHttp端点(和mex).当我将httpsGetUrl留空时,它会显示服务器名称而不是我需要的公共uri(对于wsdl)

这是配置的重要部分.

  <service behaviorConfiguration="myServiceBehaviors" name="WebApplication1.Service1">
    <clear/>

    <endpoint behaviorConfiguration="flatwsdl" address="mex" binding="mexHttpsBinding" bindingConfiguration="mexHttpsBinding"
      contract="IMetadataExchange" listenUriMode="Explicit">         
    </endpoint>

    <endpoint  behaviorConfiguration="flatwsdl" address="wsHttp" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingConfig"
      contract="WebApplication1.IService1" />
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="myServiceBehaviors">
      <serviceDebug includeExceptionDetailInFaults="true" />
      <serviceMetadata httpsGetEnabled="true" httpsGetUrl="https://mydomain.com/integration/Service1.svc" />
    </behavior>
  </serviceBehaviors>
        <endpointBehaviors>
    <behavior name="flatwsdl">
      <wsdlExtensions />
    </behavior>
  </endpointBehaviors>
</behaviors>
Run Code Online (Sandbox Code Playgroud)

有什么建议?

wcf

2
推荐指数
1
解决办法
3954
查看次数

标签 统计

wcf ×1