FIX: URIs in a WCF WSDL document refer to inaccessible internal instances instead of to the load balancer as expected in the .NET Framework 3.0 in Windows Server 2003, Windows XP, Windows Vista and Windows Server 2008

Article translations Article translations
Article ID: 971842 - View products that this article applies to.
Expand all | Collapse all

On This Page

Symptoms

When you use a Windows Communication Foundation (WCF) service in load-balanced scenarios in the Microsoft .NET Framework 3.0 in Windows Server 2003, Windows XP, Windows Vista and Windows Server 2008, you experience one or more of the following issues:

Issue 1

Consider the following scenario:
  • You have installed the Microsoft Azure SDK and the Windows Azure Tools for Microsoft Visual Studio.
  • You create a Web Cloud Service project and add a Windows Communication Foundation (WCF) service to the project.
  • You debug the project in the development fabric.
  • You browse to the Web Service Definition Language (WSDL) document of the WCF service.
In this scenario, you notice that the URIs in the WSDL document refer to inaccessible internal Web site instances (http://127.0.0.1:5001/Service.svc?wsdl). However, you expect the URIs in the WSDL document to refer to the load balancer (http://127.0.0.1:81/Service.svc?wsdl). Additionally, when you try to add a reference to the service, you receive a failure notice in the Add Service Reference dialog box.

Issue 2

Consider the following scenario:
  • You host a WCF service on an instance behind a load-balancer.
  • You use the “Add Service Reference” command or the svcutil.exe command-line tool to download the metadata from the service.
In this scenario, when you try to generate a proxy from the metadata, the process fails because the metadata contains URIs that reference internal Web site instances.

Cause

The issues described in the "Symptoms" section occur because the load balancer is accessed externally. However, the internal Web site instances behind the load-balancer are inaccessible.

Resolution

Note If you are using the .NET Framework 3.5 Service Pack 1 on Windows 7 or on Windows Server 2008 R2, install the hotfix that is described in the following Microsoft Knowledge Based article:
977420 A hotfix rollup is available to fix problems in Windows Communication Foundation in the .NET Framework 3.5 SP1 for Windows 7 and for Windows Server 2008 R2

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

To download this hotfix from the MSDN Code Gallery, visit the following Microsoft Web site:
http://code.msdn.microsoft.com/KB971842

Note The MSDN Code Gallery displays the languages for which the hotfix is available. If you do not see your language listed, it is because the Code Gallery resource page is not available for that language.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support

Prerequisites

To apply this hotfix, you must have the .NET Framework 3.5 Service Pack 1 (SP1) or the .NET Framework 3.0 Service Pack 2 (SP2) installed on one of the following operating systems:
  • Windows XP
  • Windows Server 2003
  • Windows Vista SP2
  • Windows Server 2008 SP2

Note For a Windows 7 or Window Server 2008 R2 version of this hotfix, click the following article number to view the article in the Microsoft Knowledge Base:
981002 A hotfix rollup is available for Windows Communication Foundation in the .NET Framework 3.5 SP1 for Windows 7 and Windows Server 2008 R2

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
x86-based version for Windows XP and Windows Server 2003
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Servicemonikersupport.dll3.0.4506.445617,25608-Dec-200923:03x86
Smdiagnostics.dll3.0.4506.4456110,59208-Dec-200923:03x86
System.identitymodel.dll3.0.4506.4456438,27208-Dec-200923:03x86
System.runtime.serialization.dll3.0.4506.4456970,75208-Dec-200923:03x86
System.servicemodel.dll3.0.4506.44565,984,25608-Dec-200923:03x86
System.servicemodel.washosting.dll3.0.4506.445632,76808-Dec-200923:03x86
x64-based version for Windows XP and Windows Server 2003
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Servicemonikersupport.dll3.0.4506.445619,30408-Dec-200922:24x64
Smdiagnostics.dll3.0.4506.445694,20808-Dec-200922:24x64
System.identitymodel.dll3.0.4506.4456397,31208-Dec-200922:24x64
System.runtime.serialization.dll3.0.4506.4456847,87208-Dec-200922:24x64
System.servicemodel.dll3.0.4506.44565,324,80008-Dec-200922:24x64
System.servicemodel.washosting.dll3.0.4506.445632,76808-Dec-200922:24x64
x86-based version for Windows Vista SP2 and Windows Server 2008 SP2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Servicemonikersupport.dll3.0.4506.414317,24008-Jul-200912:26x86
System.runtime.serialization.dll3.0.4506.4143970,75208-Jul-200912:26x86
System.servicemodel.dll3.0.4506.41435,939,20008-Jul-200912:26x86

x64-based version of Windows Vista SP2 and Windows Server 2008 SP2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Servicemonikersupport.dll3.0.4506.414319,28808-Jul-200912:26x64
System.runtime.serialization.dll3.0.4506.4143847,87208-Jul-200912:26x64
System.servicemodel.dll3.0.4506.41435,275,64808-Jul-200912:26x64

Itanium-based version of Windows Server 2008 SP2
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Servicemonikersupport.dll3.0.4506.414333,64008-Jul-200912:27IA-64
System.runtime.serialization.dll3.0.4506.4143847,87208-Jul-200912:26IA-64
System.servicemodel.dll3.0.4506.41435,275,64808-Jul-200912:26IA-64

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More information

To enable the hotfix after you installed it, you have to configure the WCF service to use the following service behavior:
<serviceBehaviors>
   <behavior name="<name>">
     <useRequestHeadersForMetadataAddress>
       <defaultPorts>
          <add scheme="http" port="81" />
          <add scheme="https" port="444" />
        </defaultPorts>
      </useRequestHeadersForMetadataAddress>
   </behavior>
</serviceBehaviors>

Note <name> is a placeholder that you should replace with the behavior name in your WCF service.

The hotfix causes WCF to generate the correct URI by using the "Host" HTTP header of the incoming metadata request. In this case, the "Host" header contains the load balancer address instead of the internal node address.

If a URI inside the WSDL document has a different scheme than the scheme of the "Host" header URI, for example, if a request for metadata comes over HTTPS but the metadata contains HTTP URIs, the hotfix will need the port number for that different scheme. The port number can be specified per scheme in the <defaultPorts> section.

Properties

Article ID: 971842 - Last Review: June 20, 2014 - Revision: 9.0
Applies to
  • Microsoft .NET Framework 3.0
  • Microsoft .NET Framework 3.0 Service Pack 1
  • Microsoft .NET Framework 3.0 Service Pack 2
Keywords: 
kbexpertiseadvanced kbsurveynew kbqfe KB971842

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com