Microsoft KB Archive/811586

= No recommendation is made to change the http://tempuri.org/ namespace in Visual C++ .NET Managed C++ Web Service applications =

Article ID: 811586

Article Last Modified on 5/10/2007

-

APPLIES TO


 * Microsoft Visual C++ .NET 2002 Standard Edition
 * Microsoft Visual C++ .NET 2003 Standard Edition
 * Microsoft Visual Studio .NET 2002 Academic Edition
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Enterprise Architect

-



SYMPTOMS
When you run a Web service in Visual Studio .NET, and you click Start on the Debug menu, a Web page appears that displays the methods that are exposed by the Web service. If the Web service uses &quot;http://tempuri.org/&quot; as its default namespace, a recommendation is made to change the namespace appropriately. Recommendations for changes to namespaces are supplied for Microsoft Visual Basic .NET applications, and for Visual C# .NET applications, but not for Visual C++ .NET Managed C++ Web Service applications.



RESOLUTION
You can change the default namespace by using the Namespace property of the WebService attribute. The WebService attribute is an attribute that is applied to the class that contains the XML Web service methods. The following example sets the namespace to &quot;http://microsoft.com/webservices/&quot;: [WebService(Namespace=&quot;http://microsoft.com/webservices/&quot;)] public __gc class MyWebServiceClass : public System::Web::Services::WebService {       // Implementation }; Identify your XML Web service with a namespace that you control. For example, you can use the Internet domain name of your company as part of the namespace. Many XML Web service namespaces look similar to URLs, however, namespaces do not have to point to actual resources on the Web. (XML Web service namespaces are URIs.)



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
Each XML Web service must have a unique namespace for client applications to distinguish the Web service from other services on the Web. For XML Web services that are under development, &quot;http://tempuri.org/&quot; is available. However, use a more permanent namespace for published XML Web services. For additional information about XML namespaces, see the following World Wide Web Consortium (W3C) Web site:

Namespaces in XML

http://www.w3.org/TR/REC-xml-names/



Changing http://TempURI.org/ Namespace in MC++ Applications

Keywords: kbvs2002sp1sweep kbwebservices kbbug KB811586

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.