Microsoft KB Archive/815214

= PRB: &quot;The 'Type' Attribute Must Be Set to a Valid Type Name.&quot; Error Message Occurs When You Try to Consume a Web Service =

Article ID: 815214

Article Last Modified on 7/31/2007

-

APPLIES TO


 * Microsoft .NET Framework 1.0

-





SYMPTOMS
When you try to consume a Web service or add a Web reference to a Web service on a computer with the .NET Framework version 1.0 installed and with the .NET Framework version 1.1 SOAP extensions activated, you may receive the following error message:

The 'type' attribute must be set to a valid type name.



CAUSE
Because the .NET Framework version 1.1 SOAP extensions are incompatible with the .NET Framework version 1.0, when you activate the .NET Framework version 1.1 SOAP extensions on a computer that has the .NET Framework version 1.0 installed, you receive the error message in the &quot;Symptoms&quot; section. The error occurs when you try to consume a Web service or add a Web reference to a Web service.

SOAP extensions are typically activated in the machine configuration file (Machine.config) that is located in the following directory:

\Microsoft.NET\Framework\v1.0.3705\CONFIG

Note You receive the error that is mentioned in the &quot;Symptoms&quot; section under the following conditions:
 * Your computer has only the .NET Framework version 1.0 installed and not the .NET Framework version 1.1.
 * The activated SOAP extensions are built by using the .NET Framework version 1.1. The activated SOAP extensions are installed in the Global Assembly Cache on your computer.



RESOLUTION
To resolve this problem, install the .NET Framework version 1.1. After you install the .NET Framework version 1.1, you may consume Web services or add Web references to Web services without receiving the error message in the &quot;Symptoms&quot; section. Additionally, Web services can use the functionality that is provided by the activated .NET Framework version 1.1 SOAP extensions.

A less-recommended resolution is to disable the .NET Framework version 1.1 SOAP extensions. You can do this if you comment out the code that activates these extensions. In this case, Web services cannot use the functionality that is provided by the .NET Framework version 1.1 SOAP extensions. To disable the .NET Framework version 1.1 SOAP extensions, follow these steps:  Open the Machine.config file by using a text editor such as Notepad. Locate the  tag in the Machine.config file.  Under the  tag, comment out the code that activates the SOAP extensions. For example, comment out the code as follows:

Note In the previous example, TraceExtension is the name of the SOAP extension class, and MySoapExtension corresponds to the MySoapExtension.dll assembly that contains the code for TraceExtension. The other attributes such as Version, Culture, PublicKeyToken, and Custom correspond to the MySoapExtension.dll assembly. 



STATUS
This behavior is by design.

