In an ASP.NET Web Application project, when you try to add a Web reference to a Web service that a proxy server publishes, you may receive an error message that is similar to the following error message.
Microsoft .NET Framework 1.0
Unable to download the following files from http://<wsproxyserver>/WebService2/service1.asmx?op=HelloWorld, http://<wsproxyserver>:6789/WebService2/service1.asmx?wsdl. Do you want to skip these files and continue?
Microsoft .NET Framework 1.1
Unable to download the following file from http://<wsproxyserver>:6789/WebService2/service1.asmx?wsdl. Do you want to skip this file and continue?
Note Throughout this article, wsproxyserver is a placeholder for the IP address of the proxy server.
From a Web client, you try to add a Web reference to a Web service so that the internal Web server is inside a proxy network. The Redirect port number of the proxy server is then attached to the Internet Protocol (IP) address of the proxy server in the generated proxy class instead of the Listener port number of the proxy server being attached to the IP address of the proxy server in the generated proxy class.
To work around this bug, use the Web Services Description Language tool (Wsdl.exe) to create a client proxy class and then modify the proxy class to update the URL information with the correct port number.
To do this, follow these steps:
Create a client proxy class.
To do this, follow these steps:
In Microsoft Windows Explorer, create a folder that is named Clientproxy in the C:\ root directory.
At a Microsoft Visual Studio .NET command prompt, change the directory path to the C:\Clientproxy directory.
At the Visual Studio .NET command prompt, run the following command.
Note In this URL, internalwebserver is a placeholder for the name of your internal Web server.
Create an ASP.NET Web Application Project on a Computer That Is Outside the Proxy Server
Start Visual Studio .NET.
Use Visual C# .NET or use Visual Basic .NET to create an ASP.NET Web Application project that is named Project1.
On the Build menu, click Build Solution.
Add a Web Reference to the Web Service
In Solution Explorer, right-click References, and then click Add Web Reference.
The Add Web Reference dialog box is displayed.
Type http://wsproxyserver/WebServiceProxy/Service1.asmx in the Address box, and then click Go.
When the proxy server prompts you for authentication credentials, type your UserName and type your Password in the corresponding text boxes.
You receive the error message that is mentioned in the "Symptoms" section of this article.
Note If the IP address in the error message contains the port number of the internal Web server, configure the publishing properties of the ISA server to display the IP address of the proxy server instead of displaying the IP address of the internal Web server.
For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
308359 HOW TO: Write a Simple Web Service by Using Visual C# .NET
313072 HOW TO: Configure the Web Publishing Service to Work with Internet Security and Acceleration Server in Windows 2000