Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > underlying connection was closed: unable to connect to the remote server: COM --> .Net --> WebService --> Error

Reply
Thread Tools

underlying connection was closed: unable to connect to the remote server: COM --> .Net --> WebService --> Error

 
 
Monty
Guest
Posts: n/a
 
      09-27-2006
OK, I had an issue with this and found lots of advice that did not apply, so
I'm posting what I found hoping it might help someone else. Here's the
sitch: you have a COM app that calls to a .Net assembly which in turn calls
a web service. You know the web service is reachable and that the COM app is
able to instantiate your .Net assembly (because you RegAsm'ed it and it's
good to go). However, when you attempt to make a call to the web service you
get the error message "underlying connection was closed: unable to connect
to the remote server". Chances are, you've had people telling you this is a
proxy issue even though you're pretty sure it's not. OK, here's what saved
me: simply add your assembly to the GAC. That's it. Even if you've RegAsm'ed
the heck outta your assembly and the COM object has no problems
instantiating it, I got this error every time it made a call to the
webservice until I added it to the GAC, then it worked like magic.

If anyone knows why this is, please chime in. Thanks.

Keywords: COM, ASMX, Web Service, Web Services, interop, REGASM, GACUTIL,
CCW, Register for COM, proxy, proxies, "underlying connection was closed:
unable to connect to the remote server"


 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      09-27-2006
"Monty" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> OK, I had an issue with this and found lots of advice that did not apply,
> so I'm posting what I found hoping it might help someone else. Here's the
> sitch: you have a COM app that calls to a .Net assembly which in turn
> calls a web service. You know the web service is reachable and that the
> COM app is able to instantiate your .Net assembly (because you RegAsm'ed
> it and it's good to go). However, when you attempt to make a call to the
> web service you get the error message "underlying connection was closed:
> unable to connect to the remote server". Chances are, you've had people
> telling you this is a proxy issue even though you're pretty sure it's not.
> OK, here's what saved me: simply add your assembly to the GAC. That's it.
> Even if you've RegAsm'ed the heck outta your assembly and the COM object
> has no problems instantiating it, I got this error every time it made a
> call to the webservice until I added it to the GAC, then it worked like
> magic.
>
> If anyone knows why this is, please chime in. Thanks.


I wonder if this is a trust issue.

John


 
Reply With Quote
 
 
 
 
David Betz
Guest
Posts: n/a
 
      09-28-2006
I'm surprised you aren't getting threading errors... COM's not supposed
to do stuff like that.

Try switching everything to COM+ (Enterprise Services)... that ALWAYS
works for me. I just many applications via Enterprise Services.

Monty wrote:
> OK, I had an issue with this and found lots of advice that did not apply, so
> I'm posting what I found hoping it might help someone else. Here's the
> sitch: you have a COM app that calls to a .Net assembly which in turn calls
> a web service. You know the web service is reachable and that the COM app is
> able to instantiate your .Net assembly (because you RegAsm'ed it and it's
> good to go). However, when you attempt to make a call to the web service you
> get the error message "underlying connection was closed: unable to connect
> to the remote server". Chances are, you've had people telling you this is a
> proxy issue even though you're pretty sure it's not. OK, here's what saved
> me: simply add your assembly to the GAC. That's it. Even if you've RegAsm'ed
> the heck outta your assembly and the COM object has no problems
> instantiating it, I got this error every time it made a call to the
> webservice until I added it to the GAC, then it worked like magic.
>
> If anyone knows why this is, please chime in. Thanks.
>
> Keywords: COM, ASMX, Web Service, Web Services, interop, REGASM, GACUTIL,
> CCW, Register for COM, proxy, proxies, "underlying connection was closed:
> unable to connect to the remote server"


 
Reply With Quote
 
Monty
Guest
Posts: n/a
 
      09-28-2006
Hi David,

It seems to be working fine now that it's in the GAC. What exactly is COM
not supposed to do? Can you point me towards any docs on this?
Thanks


"David Betz" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> I'm surprised you aren't getting threading errors... COM's not supposed
> to do stuff like that.
>
> Try switching everything to COM+ (Enterprise Services)... that ALWAYS
> works for me. I just many applications via Enterprise Services.
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The underlying connection was closed: Unable to connect to the remote server Marisha ASP .Net 0 03-27-2006 10:11 PM
Error: "The underlying connection was closed: Unable to connect to the remote server." TechNeck ASP .Net Web Services 0 03-23-2005 04:03 PM
webservice problem: The underlying connection was closed: Unable to connect to the remote server Frasse ASP .Net Web Services 3 02-13-2004 12:26 PM
The underlying connection was closed: Unable to connect to the remote server Tom McDonald ASP .Net Web Services 1 12-20-2003 12:59 PM
The underlying connection was closed: Unable to connect to the remote server Ilya ASP .Net Web Services 0 09-15-2003 06:55 PM



Advertisments