FIX: The Web Services Description Language (WSDL) that is generated from a remote object may not include the type information for nested types or types that include overloaded methods in the .NET Framework 2.0 (917782)



The information in this article applies to:

  • Microsoft .NET Framework 2.0
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Standard Edition

SYMPTOMS

When you use the HttpChannel class to remote an object in a Microsoft .NET Framework 2.0 Remoting application, the Web Services Description Language (WSDL) that is generated from the remote object may not include the type information for nested types or for types that include overloaded methods in the remote object. For example, you may use code that resembles the following code examples for the remote object.

Example 1

This example is about the nested types.
class MyRemoteClass : System.MarshalByRefObject
{
	public MyRemoteClass()
	{ }

	public EmpDetail GetEmpInfo()
	{
		return new EmpDetail();
	}
}
In this example, the EmpDetail class is contained in another assembly that is defined by using the following code example.
[Serializable]
public class EmpDetail
{
	private string m_Id;
	private string m_description;

	public string Id
	{
		get 
		{ return m_Id; }
		set
		{ m_Id = value; }
	}

	public string Description
	{
		get
		{ return m_description; }
		set
		{ m_description = value; }
	}
}
In this example, when you examine the WSDL that is generated from the remote object, you notice that there is no type information for the ID property or for the Description property.

Example 2

This example is about the types that include overloaded methods.

The following code is in the client.
using System;
class app 
{
    static void Main()
    {
	DogService ds = new DogService();
        Console.WriteLine(ds.Bark("steve", "citect"));
        Console.WriteLine(ds.Bark());
    }
}
The following code is in the server.
using System;
using System.Text;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;
using System.Threading;

public class Dog : MarshalByRefObject
{
    public string Bark()
    {
        return "woof";
    }
    public string Bark(string userName, string password)
    {
        return userName + password;
    }
}
class Program
{
    static void Main(string[] args)
    {
        HttpChannel ch = new HttpChannel(7777);
        ChannelServices.RegisterChannel(ch);
        string uri = string.Concat("b1/", typeof(Dog).Name);
        Console.WriteLine(uri);
        RemotingConfiguration.RegisterWellKnownServiceType(typeof(Dog), uri, WellKnownObjectMode.Singleton);
        Console.WriteLine("open for business");
        Console.ReadLine();
    }
}
In this example, when you examine the WSDL that is generated from the remote object, you may receive an NullReferenceException exception when you step over the overloaded method call.

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft .NET Framework 2.0 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must be running the .NET Framework 2.0.

Restart requirement

You must 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.
File nameFile versionFile sizeDateTimePlatform
Mscordacwks.dll2.0.50727.97800,25607-Apr-200603:58x86
Mscorlib.dll2.0.50727.974,317,18407-Apr-200603:58x86
Mscorwks.dll2.0.50727.975,618,17607-Apr-200603:58x86
Normalization.dll2.0.50727.9715,36007-Apr-200603:58x86
Sos.dll2.0.50727.97377,34407-Apr-200603:58x86
System.data.dll2.0.50727.972,893,31207-Apr-200603:58x86
System.data.oracleclient.dll2.0.50727.97482,30407-Apr-200603:58x86
System.dll2.0.50727.973,018,75207-Apr-200603:58x86
System.runtime.remoting.dll2.0.50727.97294,91207-Apr-200603:58x86

STATUS

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

MORE INFORMATION

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates


Modification Type:MajorLast Reviewed:8/29/2006
Keywords:kbQFE kbhotfixserver kbpubtypekc KB917782 kbAudITPRO kbAudDeveloper