Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF over IIS through load balancer reports wrong base address
    primarykey
    data
    text
    <p>I'm trying to launch a WCF service over SSL on IIS 6 through a load balancer. My initial problem was an obvious and pretty well discussed one - the address shown on the WSDL page pointed to <a href="https://SERVERNAME/WebServices/mydomainws.svc" rel="noreferrer">https://SERVERNAME/WebServices/mydomainws.svc</a> instead of www.mydomain.com. The answer to this problem is to add a host header value in IIS. I did that and it worked... sort of. I now get <strong>http</strong>://www.mydomain.com/WebServices/mydomainws.svc when viewing the wsdl in a browser. If I click on that link (the non-ssl link) I get a service definition that again references the server name. </p> <p>The next oft recommended remedy is to use <a href="http://wcfextras.codeplex.com/" rel="noreferrer">WCF Extras</a> which provides an extension that allows you to specify a base address. But setting that config entry only updated the soap12:address. The EndPointReference address is still using the machine name. </p> <p>To summarize: WSDL as viewed in web browser at <a href="https://www.mydomain.com/WebServices/mydomainws.svc" rel="noreferrer">https://www.mydomain.com/WebServices/mydomainws.svc</a>: <strong>http</strong>://www.mydomain.com/WebServices/mydomainws.scv</p> <p>Clicking the above link brings me to an actual wsdl file with the following service entry:</p> <p> <strong></strong> <strong> <a href="https://ServerName/WebServices/mydomainws.svc" rel="noreferrer">https://ServerName/WebServices/mydomainws.svc</a></strong> </p> <p>My server config file has the following serviceModel entries:</p> <pre><code>&lt;system.serviceModel&gt; &lt;bindings&gt; &lt;wsHttpBinding&gt; &lt;binding name="TransportSecurity"&gt; &lt;security mode="Transport"&gt; &lt;message clientCredentialType="None"/&gt; &lt;transport clientCredentialType="None"/&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/wsHttpBinding&gt; &lt;/bindings&gt; &lt;services&gt; &lt;service name="mydomain.ws.mydomainws" behaviorConfiguration="mydomainwsBehavior"&gt; &lt;!-- Service Endpoints --&gt; &lt;endpoint address="" **behaviorConfiguration="CorrectEndPoint"** binding="wsHttpBinding" bindingConfiguration="TransportSecurity" contract="mydomain.ws.Imydomainws"/&gt; &lt;endpoint address="mex" **behaviorConfiguration="CorrectEndPoint"** binding="mexHttpsBinding" contract="IMetadataExchange"/&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="mydomainwsBehavior"&gt; &lt;!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --&gt; &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;endpointBehaviors&gt; **&lt;behavior name="CorrectEndPoint"&gt; &lt;wsdlExtensions location="https://www.mydomain.com/WebServices/mydomainws.svc" singleFile="true"/&gt; &lt;/behavior&gt;** &lt;/endpointBehaviors&gt; &lt;/behaviors&gt; &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt; &lt;extensions&gt; &lt;behaviorExtensions&gt; &lt;add name="wsdlExtensions" type="WCFExtras.Wsdl.WsdlExtensionsConfig, WCFExtras, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/&gt; &lt;/behaviorExtensions&gt; &lt;/extensions&gt; &lt;/system.serviceModel&gt; </code></pre> <p>Can anyone point me in the right direction?<br> Thanks, George</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload