PRB: "The 'Type' Attribute Must Be Set to a Valid Type Name." Error Message Occurs When You Try to Consume a Web Service (815214)
The information in this article applies to:
- Microsoft .NET Framework 1.0
SYMPTOMSWhen 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.
CAUSEBecause 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
"Symptoms" 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: %WINDIR%\Microsoft.NET\Framework\v1.0.3705\CONFIG Note You receive the error that is mentioned in the "Symptoms"
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.
RESOLUTIONTo 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 "Symptoms" 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 <soapExtensionTypes> tag in the Machine.config file.
- Under the <soapExtensionTypes> tag, comment out the code that activates the SOAP extensions. For
example, comment out the code as follows:
<!--add type ="TraceExtension, MySoapExtension, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ac649c0c76c3ea58, Custom=null"/--> 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.
Modification Type: | Minor | Last Reviewed: | 1/21/2004 |
---|
Keywords: | kbWebFolder kbSysSettings kbWebServices kbweb kbConfig kbprb KB815214 kbAudDeveloper |
---|
|