2011-12-29 7 views
1

これは他のスタック投稿に似ていますが、私は1つのwsHttpエンドポイント(およびmex)のみをホストしています。私はhttpsGetUrlを空のままにしておくと、必要な公共URIの代わりにサーバー名が表示されます(wsdlの場合)WCF HttpsGetUrl URIの登録がすでに存在しています

ここは設定の重要な部分です。

<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> 

何か提案がありますか?

答えて

4

パブリックURIが必要な場合は、サービス動作で<useRequestHeadersForMetadataAddress>の動作を使用する必要があります。これはまさにこの動作の目的です。

<behavior name="myServiceBehaviors"> 
    <useRequestHeadersForMetadataAddress /> 
    <serviceDebug includeExceptionDetailInFaults="true" /> 
    <serviceMetadata httpsGetEnabled="true" /> 
</behavior> 
関連する問題