all groups > dotnet web services > march 2005 >
You're in the

dotnet web services

group:

Call to external webservice returns error "System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server."



Call to external webservice returns error "System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server." rjempson NO[at]SPAM gmail.com
3/30/2005 10:56:11 PM
dotnet web services: I have a VB.NET serviced component (COM+), running on a lan, that
calls out to an external web service to place an order with a
supplier.

The problem machine is the middle tier (COM+) for our in house
applications, and also has a mail server to service a 100 stores
(don't ask me why, I don't like this either).

The call to the webservice works correctly on our test COM+ machine
but fails on the production machine with the above error. It also
works correctly from my development machine.

I have no control over the implementation of the webservice.

From the problem machine, I can access the asmx via internet explorer
and see web methods and descriptions.

The machine.config is in its default state (no proxy specified).

The network admin has given both COM+ machines (and my developer
machine if I run it from here) the ability to bypass the proxy server,
thus there are no settings specified (or required to browse the web)
in the IE LAN settings. I did this as I couldn't get it to work by
supplying credentials programmatically ( eg svr.PreAuthenticate =
true; and svr.Proxy.Credentials = new
System.Net.NetworkCredential("username","password","domain");).

I have run netstat -p TCP on the production COM+ machine. On that
occassion there were probably 20 connections in the TIME_WAIT state
and probably 40 ESTABLISHED.

I am about to rebuild the serviced component to return the stack trace
rather than exception.tostring. Hopefully that might reveal more
detail.

Any help is appreciated.

Regards,

Re: Call to external webservice returns error "System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server." rnojspamempson NO[at]SPAM gmail.com
3/30/2005 11:06:08 PM
PS.

It is framework v 1.1 SP1, and WSE 1.0
Re: Call to external webservice returns error "System.Net.WebException: The underlying connection was closed: Unable to connect to the remote server." rnojspamempson NO[at]SPAM gmail.com
4/1/2005 6:50:51 PM
This was fixed by clearing an old (no longer existing switch or server)
registry setting for the default gateway from a previous version of IE.
I searched the registry for proxy settings and found this one, deleted
it, and had to restart, refresh components in COM+ to get it to work.

Essentially in this case I am not supplying the proxy address /
credentials programmatically, and the machine this is installed on has
to be able to bypass the proxy server to access the internet. Using
the default gateway. I guess it must first look for any IE proxy
settings, and tries to use them. I dont fully understand but it might
also depend on the user context under which the application is running.
In this case I have COM+ impersonating a network user, and this might
cause the web classes to look for a profile (roaming profiles) on the
COM+ machine when it goes to look for IE settings?

I am interested to understand how this works.
AddThis Social Bookmark Button