Note that there are some explanatory texts on larger screens.

plurals
  1. PO.net 4 WCF Endpoint in generated metadata (WSDL) points to node rather than virtual host hosted on load balanced (NLBS) IIS6
    primarykey
    data
    text
    <p>This is real simple. I have a wcf service (nothing fancy, just New Project-> WCF Service Application), that runs great in Visual Studio. When I deploy it to an clustered IIS6 environment, it works mostly. I can send a request and get a response. </p> <p>However, the generated metadata consistently refers to a particular node in the cluster and not the clusters virtual name.</p> <pre><code>https://clustername.test.com/WcfService1/Service1.svc </code></pre> <p>shows the following in HTML:</p> <pre><code>Service1 Service You have created a service. To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax: svcutil.exe https://node1.test.com/DocrRetention/Service1.svc?wsdl </code></pre> <p>which is showing the node name (node1.test.com) rather than the cluster name.</p> <pre><code>https://clustername.test.com/WcfService1/Service1.svc?wsdl </code></pre> <p>shows the following xml: </p> <pre><code>... &lt;wsdl:types&gt; &lt;xsd:schema targetNamespace="http://tempuri.org/Imports"&gt; &lt;xsd:import schemaLocation="https://node1.test.com/WcfService1/Service1.svc?xsd=xsd0" namespace="http://tempuri.org/"/&gt; &lt;xsd:import schemaLocation="https://node1.test.com/WcfService1/Service1.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/&gt; &lt;xsd:import schemaLocation="https://node1.test.com/WcfService1/Service1.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/WcfService1"/&gt; &lt;/xsd:schema&gt; &lt;/wsdl:types&gt; ... &lt;wsdl:service name="Service1"&gt; &lt;wsdl:port name="BasicHttpBinding_IService1" binding="tns:BasicHttpBinding_IService1"&gt; &lt;soap:address location="https://node1.test.com/WcfService1/Service1.svc"/&gt; &lt;/wsdl:port&gt; &lt;/wsdl:service&gt; &lt;/wsdl:definitions&gt; </code></pre> <p>Again, showing the node name rather than the virtual host.</p> <p>So what does my web.config look like? It is small so I'll show the whole thing.</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;configuration&gt; &lt;system.web&gt; &lt;customErrors mode="Off"/&gt; &lt;compilation debug="true" strict="false" explicit="true" targetFramework="4.0" /&gt; &lt;/system.web&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding&gt; &lt;security mode="Transport"/&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;services&gt; &lt;service name="WcfService1.Service1"&gt; &lt;endpoint binding="basicHttpBinding" contract="WcfService1.IService1"/&gt; &lt;endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" /&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior&gt; &lt;serviceMetadata httpsGetEnabled="true"/&gt; &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </code></pre>
    singulars
    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.
    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