Creating a web reference to a URL beyond the company firewall

From: mauricethegp (mauricethegp_at_newsgroup.nospam)
Date: 01/31/05

Date: Mon, 31 Jan 2022 10:43:05 -0800

I know that this may be an old chestnut to .NET developers and that there are
workarounds in normal .NET projects, but here goes anyway...

The scenario is that I want to create a BizTalk application that will
consume a web service. The web service is hosted on a computer which is on
the public internet, outside the company firewall. All access to such public
internet sites have to be routed via the company proxy server.

Let's say for example:
* the web service is at,
* the proxy server name (as shown in Internet Properties/Connections/Lan
Settings) is companyproxy, using port 80

I know I need to add a web reference via the "Add Web Reference" wizard.

If I just give "Add Web Reference" the URL
"" then I get prompted for
username/password/domain. After supplying the valid credentials the dialogue
shows the documentation about the available services in "theservice.asmx" in
the browser pane, but has a message in the "web services found at this URL"
to the effect "There was an error downloading
The underlying connection was closed: Unable to connect to the remote server."

The documentation for Add Web Reference says that I have to include the
proxy server address in the URL. I've tried
and lots of other combinations, but so far all I get are syntax or other

How do I specify this URL?

PS I know that in a normal C# project, I can create a proxy class using
wsdl.exe and include that class in the project, then instantiate an object of
that class and attach a Web Proxy object with the default or specified
credentials. I can't see how I can use this technique in BizTalk, though,
where I don't seem to have the option of meddling with the source files...

I hope someone out there can help. It MUST be a common enough scenario...

Steve Gunning

Relevant Pages