2011-10-21 81 views
3

我在我的WCF Web.Config中有下面的內容。當我嘗試訪問WCF服務時,出現「註冊已存在URI」錯誤。 WCF服務託管在SSL環境中。WCF:註冊已存在URI

任何人都可以幫忙嗎?

<system.serviceModel> 
    <bindings> 
     <basicHttpBinding> 
      <binding name="WSBinding" closeTimeout="00:01:00" openTimeout="00:01:00" 
      receiveTimeout="00:01:00" sendTimeout="00:01:00" allowCookies="false" 
      bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" 
      maxBufferPoolSize="524288" maxReceivedMessageSize="52428800" useDefaultWebProxy="true"> 
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
      maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
      <security mode="None" /> 
      </binding> 
     </basicHttpBinding> 

     <webHttpBinding> 
      <binding name="SOAPBinding" closeTimeout="00:01:00" openTimeout="00:01:00" 
      receiveTimeout="00:01:00" sendTimeout="00:01:00" allowCookies="false" 
      bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" 
      maxBufferPoolSize="524288" maxReceivedMessageSize="52428800" useDefaultWebProxy="true"> 
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
      maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
      <security mode="None" /> 
      </binding> 
     </webHttpBinding> 
     </bindings> 
    <behaviors> 
     <endpointBehaviors> 
     <behavior name="wsHTTPBehavior"> 
      <dataContractSerializer maxItemsInObjectGraph="2147483647"/> 
      </behavior> 

     <behavior name="jsonBehavior"> 
      <webHttp /> 
     </behavior> 

     </endpointBehaviors> 
     <serviceBehaviors> 
     <behavior name="WsBehavior"> 
     <serviceMetadata httpsGetEnabled="true" httpsGetUrl="https://*******.com/*****/*****.svc" /> 
      <serviceDebug includeExceptionDetailInFaults="false" /> 
     </behavior> 

    </serviceBehaviors> 
</behaviors> 
<services> 
    <service name="***.***" behaviorConfiguration="WsBehavior"> 
    <endpoint behaviorConfiguration="wsHTTPBehavior" binding="basicHttpBinding" contract="***.***" bindingConfiguration="WSBinding" /> 
    <endpoint address="xml" behaviorConfiguration="jsonBehavior" binding="webHttpBinding" contract="***.***" bindingConfiguration="SOAPBinding" name="SOAP" /> 
    </service> 
</services> 

回答

4

新增/MEX .svc擴展後的工作

<serviceMetadata httpsGetEnabled="true" httpsGetUrl="https://*******.com/*****/*****.svc/mex" />