BUG: You receive a "Server error" error message if you try to invoke a Web service that has a name that contains a space character by using Visual C++ .NET (837379)
The information in this article applies to:
- Microsoft ASP.NET (included with the .NET Framework 1.1)
- Microsoft ASP.NET (included with the .NET Framework) 1.0
- Microsoft Visual C++ .NET (2003)
- Microsoft Visual C++ .NET (2002)
- Microsoft Web Services (included with the .NET Framework 1.1)
- Microsoft Web Services (included with the .NET Framework) 1.0
SYMPTOMSYou may use Microsoft Visual C++ .NET to create an XML Web
service that contains a space character (" ") in its name. When you try to call this XML
Web service, you receive an error message that is similar to the following: Server Error in '/my webs' Application. The resource
cannot be found. Description: HTTP 404. The resource you are looking for (or
one of its dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make sure that it
is spelled correctly. Requested Url: /my webs/my+webs.asmx Version
Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573
Note The word "Url" is not capitalized correctly in this error message. CAUSEIf you name a Web service and if that name
contains a space character (" "), during run time the space character is
not escaped and the space character is replaced by a plus sign ("+") instead of
by "%20". The plus sign ("+") value instead of a space character generates an address that either
does not exist or may be irrelevant for that corresponding
Web service or method.WORKAROUNDTo work around this problem, use any of the following
methods:
- Do not use space characters when you name a Web
service. Use a name for the Web service that does not contain any space characters (" ").
- Replace "+" with "%20" in the Address bar when you address the Web service.
To do this with the example that is described in the "More Information" section of this article, follow these steps:
- After you click the HelloWorld link, a Web browser window opens with an address in the Address bar.
- Replace the following line in the Address
box
http://localhost/My%20Web2/my+webs.asmx?op=HelloWorld with the following
line:http://localhost/My%20Web2/my%20webs.asmx?op=HelloWorld
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section of this article.
Modification Type: | Major | Last Reviewed: | 3/12/2004 |
---|
Keywords: | kbpending kbWebServices kbWebBrowser kbweb kbProgramming kbbrowsing kbAppDev kbbug KB837379 kbAudDeveloper |
---|
|