[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Eddie Stone

10/1/2004 8:38:00 PM

I access a remote object from a client like this :

Message obj = (Message)
Activator.GetObject(typeof(Message),
"http....***.***:361/MyMessage");

obj.Send(12, "GG", 123);

It works on a remote computer from a console client however I would like
to
'send a message' from my website and I get the message :

The underlying connection was closed: Unable to connect to the remote
server.

This is also true on my localhost website unless I replace the ip addess
of my machine with 'localhost'

I am using port forwarding on my router to allow outside access;

Please tell me if I am not being clear.

TIA.



Error details :


[WebException: The underlying connection was closed: Unable to connect
to the remote server.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
(IMessage reqMsg, IMessage retMsg) +264
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type) +877
Messaging.Message.Send(Int32 Id, String message, Int32 len) +0
ASP.remoting2_aspx.Page_Load(Object sender, EventArgs e) in c:
\website\remoting2.aspx:24
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731


6 Answers

Ken Kolda

10/1/2004 9:27:00 PM

0

With your remote object server running, go to your web server and try to
telnet to it:

telnet 213.160.***.*** 361

If you don't get a response, then your network's not configured properly. If
you're able to get through but your still get errors, then my guess is
you're using CAOs (even though you did not indicate this was the case). CAOs
won't work in a NAT environment without some additional configuration. For
that info, see:

http://www.glacialcomponents.com/ArticleDetail/...

Hope that helps -
Ken


"Eddie Stone" <nospam@spammy.org> wrote in message
news:Xns9575DC0ABA078nospamspammyorg@207.46.248.16...
> I access a remote object from a client like this :
>
> Message obj = (Message)
> Activator.GetObject(typeof(Message),
> "http....***.***:361/MyMessage");
>
> obj.Send(12, "GG", 123);
>
> It works on a remote computer from a console client however I would like
> to
> 'send a message' from my website and I get the message :
>
> The underlying connection was closed: Unable to connect to the remote
> server.
>
> This is also true on my localhost website unless I replace the ip addess
> of my machine with 'localhost'
>
> I am using port forwarding on my router to allow outside access;
>
> Please tell me if I am not being clear.
>
> TIA.
>
>
>
> Error details :
>
>
> [WebException: The underlying connection was closed: Unable to connect
> to the remote server.]
> System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
> (IMessage reqMsg, IMessage retMsg) +264
> System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
> msgData, Int32 type) +877
> Messaging.Message.Send(Int32 Id, String message, Int32 len) +0
> ASP.remoting2_aspx.Page_Load(Object sender, EventArgs e) in c:
> \website\remoting2.aspx:24
> System.Web.UI.Control.OnLoad(EventArgs e) +67
> System.Web.UI.Control.LoadRecursive() +35
> System.Web.UI.Page.ProcessRequestMain() +731
>
>


Eddie Stone

10/2/2004 9:38:00 PM

0

Hi Ken,

Thanks very much for your help.

The situtation now is that it works :

- on two different remote pc from a console app , both behind
firewalls
- on a website hosted with one isp in the UK.

it does not work :

- on a console client on my own pc
- on my local website
- on a different website hosted with another isp in the USA.

If someone could provide me with any insight into this problem it would
be appreciated. Does 'Activator.GetObject' for example operate on a
certain port that the USA isp may have closed or something ?

TIA.

> With your remote object server running, go to your web server and try
> to telnet to it:
>
> telnet 213.160.***.*** 361
>
> If you don't get a response, then your network's not configured
> properly. If you're able to get through but your still get errors,
> then my guess is you're using CAOs (even though you did not indicate
> this was the case). CAOs won't work in a NAT environment without some
> additional configuration. For that info, see:
>
> http://www.glacialcomponents.com/ArticleDetail/...
>
> Hope that helps -
> Ken
>
>
> "Eddie Stone" <nospam@spammy.org> wrote in message
> news:Xns9575DC0ABA078nospamspammyorg@207.46.248.16...
>> I access a remote object from a client like this :
>>
>> Message obj = (Message)
>> Activator.GetObject(typeof(Message),
>> "http....***.***:361/MyMessage");
>>
>> obj.Send(12, "GG", 123);
>>
>> It works on a remote computer from a console client however I would
>> like to
>> 'send a message' from my website and I get the message :
>>
>> The underlying connection was closed: Unable to connect to the remote
>> server.
>>
>> This is also true on my localhost website unless I replace the ip
>> addess of my machine with 'localhost'
>>
>> I am using port forwarding on my router to allow outside access;
>>
>> Please tell me if I am not being clear.
>>
>> TIA.
>>
>>
>>
>> Error details :
>>
>>
>> [WebException: The underlying connection was closed: Unable to
>> connect to the remote server.]
>> System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
>> (IMessage reqMsg, IMessage retMsg) +264
>> System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
(MessageData
>> &
>> msgData, Int32 type) +877
>> Messaging.Message.Send(Int32 Id, String message, Int32 len) +0
>> ASP.remoting2_aspx.Page_Load(Object sender, EventArgs e) in c:
>> \website\remoting2.aspx:24
>> System.Web.UI.Control.OnLoad(EventArgs e) +67
>> System.Web.UI.Control.LoadRecursive() +35
>> System.Web.UI.Page.ProcessRequestMain() +731
>>
>>
>
>
>

retoro

10/2/2004 11:04:00 PM

0

On your PC can you telnet directly to the remote object server and get a
connection?

Ken


"Eddie Stone" <nospam@spammy.org> wrote in message
news:Xns9576E6559F948nospamspammyorg@207.46.248.16...
> Hi Ken,
>
> Thanks very much for your help.
>
> The situtation now is that it works :
>
> - on two different remote pc from a console app , both behind
> firewalls
> - on a website hosted with one isp in the UK.
>
> it does not work :
>
> - on a console client on my own pc
> - on my local website
> - on a different website hosted with another isp in the USA.
>
> If someone could provide me with any insight into this problem it would
> be appreciated. Does 'Activator.GetObject' for example operate on a
> certain port that the USA isp may have closed or something ?
>
> TIA.
>
>> With your remote object server running, go to your web server and try
>> to telnet to it:
>>
>> telnet 213.160.***.*** 361
>>
>> If you don't get a response, then your network's not configured
>> properly. If you're able to get through but your still get errors,
>> then my guess is you're using CAOs (even though you did not indicate
>> this was the case). CAOs won't work in a NAT environment without some
>> additional configuration. For that info, see:
>>
>> http://www.glacialcomponents.com/ArticleDetail/...
>>
>> Hope that helps -
>> Ken
>>
>>
>> "Eddie Stone" <nospam@spammy.org> wrote in message
>> news:Xns9575DC0ABA078nospamspammyorg@207.46.248.16...
>>> I access a remote object from a client like this :
>>>
>>> Message obj = (Message)
>>> Activator.GetObject(typeof(Message),
>>> "http....***.***:361/MyMessage");
>>>
>>> obj.Send(12, "GG", 123);
>>>
>>> It works on a remote computer from a console client however I would
>>> like to
>>> 'send a message' from my website and I get the message :
>>>
>>> The underlying connection was closed: Unable to connect to the remote
>>> server.
>>>
>>> This is also true on my localhost website unless I replace the ip
>>> addess of my machine with 'localhost'
>>>
>>> I am using port forwarding on my router to allow outside access;
>>>
>>> Please tell me if I am not being clear.
>>>
>>> TIA.
>>>
>>>
>>>
>>> Error details :
>>>
>>>
>>> [WebException: The underlying connection was closed: Unable to
>>> connect to the remote server.]
>>> System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
>>> (IMessage reqMsg, IMessage retMsg) +264
>>> System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
> (MessageData
>>> &
>>> msgData, Int32 type) +877
>>> Messaging.Message.Send(Int32 Id, String message, Int32 len) +0
>>> ASP.remoting2_aspx.Page_Load(Object sender, EventArgs e) in c:
>>> \website\remoting2.aspx:24
>>> System.Web.UI.Control.OnLoad(EventArgs e) +67
>>> System.Web.UI.Control.LoadRecursive() +35
>>> System.Web.UI.Page.ProcessRequestMain() +731
>>>
>>>
>>
>>
>>
>


Eddie Stone

10/2/2004 11:21:00 PM

0

Hi Ken,

No, I get :

'Could not open connection to the host, connection failed'

On a remote pc I get :

500 internal server error , to get more info turn on custom errors in
the servers config file.

Connection to host lost.

Would this be because I'm trying to connect locally on the same port
that the server uses ?

Thanks.



"Ken Kolda" <nospam@spam.com> wrote in news:eV5W#PNqEHA.800
@TK2MSFTNGP14.phx.gbl:

> On your PC can you telnet directly to the remote object server and get
a
> connection?
>
> Ken
>
>
> "Eddie Stone" <nospam@spammy.org> wrote in message
> news:Xns9576E6559F948nospamspammyorg@207.46.248.16...
>> Hi Ken,
>>
>> Thanks very much for your help.
>>
>> The situtation now is that it works :
>>
>> - on two different remote pc from a console app , both behind
>> firewalls
>> - on a website hosted with one isp in the UK.
>>
>> it does not work :
>>
>> - on a console client on my own pc
>> - on my local website
>> - on a different website hosted with another isp in the USA.
>>
>> If someone could provide me with any insight into this problem it
would
>> be appreciated. Does 'Activator.GetObject' for example operate on a
>> certain port that the USA isp may have closed or something ?
>>
>> TIA.
>>
>>> With your remote object server running, go to your web server and
try
>>> to telnet to it:
>>>
>>> telnet 213.160.***.*** 361
>>>
>>> If you don't get a response, then your network's not configured
>>> properly. If you're able to get through but your still get errors,
>>> then my guess is you're using CAOs (even though you did not indicate
>>> this was the case). CAOs won't work in a NAT environment without
some
>>> additional configuration. For that info, see:
>>>
>>> http://www.glacialcomponents.com/ArticleDetail/...
>>>
>>> Hope that helps -
>>> Ken
>>>
>>>
>>> "Eddie Stone" <nospam@spammy.org> wrote in message
>>> news:Xns9575DC0ABA078nospamspammyorg@207.46.248.16...
>>>> I access a remote object from a client like this :
>>>>
>>>> Message obj = (Message)
>>>> Activator.GetObject(typeof(Message),
>>>> "http....***.***:361/MyMessage");
>>>>
>>>> obj.Send(12, "GG", 123);
>>>>
>>>> It works on a remote computer from a console client however I would
>>>> like to
>>>> 'send a message' from my website and I get the message :
>>>>
>>>> The underlying connection was closed: Unable to connect to the
remote
>>>> server.
>>>>
>>>> This is also true on my localhost website unless I replace the ip
>>>> addess of my machine with 'localhost'
>>>>
>>>> I am using port forwarding on my router to allow outside access;
>>>>
>>>> Please tell me if I am not being clear.
>>>>
>>>> TIA.
>>>>
>>>>
>>>>
>>>> Error details :
>>>>
>>>>
>>>> [WebException: The underlying connection was closed: Unable to
>>>> connect to the remote server.]
>>>> System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
>>>> (IMessage reqMsg, IMessage retMsg) +264
>>>> System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
>> (MessageData
>>>> &
>>>> msgData, Int32 type) +877
>>>> Messaging.Message.Send(Int32 Id, String message, Int32 len) +0
>>>> ASP.remoting2_aspx.Page_Load(Object sender, EventArgs e) in c:
>>>> \website\remoting2.aspx:24
>>>> System.Web.UI.Control.OnLoad(EventArgs e) +67
>>>> System.Web.UI.Control.LoadRecursive() +35
>>>> System.Web.UI.Page.ProcessRequestMain() +731
>>>>
>>>>
>>>
>>>
>>>
>>
>
>
>

retoro

10/3/2004 12:19:00 AM

0

For your machine, there definitely sounds like a firewall issue --
something's preventing your machine from connecting to the remote server.
Since you're able to connect to the server from other remote machines,
chances are your client is behind a firewall that's stopping the traffic. Do
you have a firewall like ZoneAlarm installed on your machine? If so, I'd
disable it and try again just to see if that's the issue.

As for the 500 error, I'm a bit confused. Your remoting server isn't running
under IIS, right? So is this coming from the web app that's attempting to
connect to your remote object? If so, I'd either:

a) turn off the custom errors in the web.config file for the web app so you
can get more info on the error, or
b) Try to catch the exception that occurs when you first invoke the remote
object and then print the exception info to the page

Either method should help show what the error is -- who knows, maybe it has
nothing to do with yout remoting server. I doubt it's related to any port
contention issue.

Ken


"Eddie Stone" <nospam@spammy.org> wrote in message
news:Xns95773857B232nospamspammyorg@207.46.248.16...
> Hi Ken,
>
> No, I get :
>
> 'Could not open connection to the host, connection failed'
>
> On a remote pc I get :
>
> 500 internal server error , to get more info turn on custom errors in
> the servers config file.
>
> Connection to host lost.
>
> Would this be because I'm trying to connect locally on the same port
> that the server uses ?
>
> Thanks.
>
>
>
> "Ken Kolda" <nospam@spam.com> wrote in news:eV5W#PNqEHA.800
> @TK2MSFTNGP14.phx.gbl:
>
>> On your PC can you telnet directly to the remote object server and get
> a
>> connection?
>>
>> Ken
>>
>>
>> "Eddie Stone" <nospam@spammy.org> wrote in message
>> news:Xns9576E6559F948nospamspammyorg@207.46.248.16...
>>> Hi Ken,
>>>
>>> Thanks very much for your help.
>>>
>>> The situtation now is that it works :
>>>
>>> - on two different remote pc from a console app , both behind
>>> firewalls
>>> - on a website hosted with one isp in the UK.
>>>
>>> it does not work :
>>>
>>> - on a console client on my own pc
>>> - on my local website
>>> - on a different website hosted with another isp in the USA.
>>>
>>> If someone could provide me with any insight into this problem it
> would
>>> be appreciated. Does 'Activator.GetObject' for example operate on a
>>> certain port that the USA isp may have closed or something ?
>>>
>>> TIA.
>>>
>>>> With your remote object server running, go to your web server and
> try
>>>> to telnet to it:
>>>>
>>>> telnet 213.160.***.*** 361
>>>>
>>>> If you don't get a response, then your network's not configured
>>>> properly. If you're able to get through but your still get errors,
>>>> then my guess is you're using CAOs (even though you did not indicate
>>>> this was the case). CAOs won't work in a NAT environment without
> some
>>>> additional configuration. For that info, see:
>>>>
>>>> http://www.glacialcomponents.com/ArticleDetail/...
>>>>
>>>> Hope that helps -
>>>> Ken
>>>>
>>>>
>>>> "Eddie Stone" <nospam@spammy.org> wrote in message
>>>> news:Xns9575DC0ABA078nospamspammyorg@207.46.248.16...
>>>>> I access a remote object from a client like this :
>>>>>
>>>>> Message obj = (Message)
>>>>> Activator.GetObject(typeof(Message),
>>>>> "http....***.***:361/MyMessage");
>>>>>
>>>>> obj.Send(12, "GG", 123);
>>>>>
>>>>> It works on a remote computer from a console client however I would
>>>>> like to
>>>>> 'send a message' from my website and I get the message :
>>>>>
>>>>> The underlying connection was closed: Unable to connect to the
> remote
>>>>> server.
>>>>>
>>>>> This is also true on my localhost website unless I replace the ip
>>>>> addess of my machine with 'localhost'
>>>>>
>>>>> I am using port forwarding on my router to allow outside access;
>>>>>
>>>>> Please tell me if I am not being clear.
>>>>>
>>>>> TIA.
>>>>>
>>>>>
>>>>>
>>>>> Error details :
>>>>>
>>>>>
>>>>> [WebException: The underlying connection was closed: Unable to
>>>>> connect to the remote server.]
>>>>> System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
>>>>> (IMessage reqMsg, IMessage retMsg) +264
>>>>> System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
>>> (MessageData
>>>>> &
>>>>> msgData, Int32 type) +877
>>>>> Messaging.Message.Send(Int32 Id, String message, Int32 len) +0
>>>>> ASP.remoting2_aspx.Page_Load(Object sender, EventArgs e) in c:
>>>>> \website\remoting2.aspx:24
>>>>> System.Web.UI.Control.OnLoad(EventArgs e) +67
>>>>> System.Web.UI.Control.LoadRecursive() +35
>>>>> System.Web.UI.Page.ProcessRequestMain() +731
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>


Eddie Stone

10/3/2004 11:31:00 AM

0

Ken,

You're right my remoting server isn't running under IIS.

When I added the customErrors tag telnet on the local machine gives me the
same error message while the remote machine I get no message for eiter
'on' or 'off'.

And now I look again I get no error message even without the .config file
at all, I must have made some mistake before and I can't now reproduce it
( my head is spinnng with all this :| )

I do not have any firewall istalled other than the one in my router and
windows firewall is off.

So it would seem to a connection issue, my local pc simply can't connect to
the port and neither it seems can my website in the USA ( though I can
telnet from it because it is a hosted website )

Thanks for all you help.



> For your machine, there definitely sounds like a firewall issue --
> something's preventing your machine from connecting to the remote
> server. Since you're able to connect to the server from other remote
> machines, chances are your client is behind a firewall that's stopping
> the traffic. Do you have a firewall like ZoneAlarm installed on your
> machine? If so, I'd disable it and try again just to see if that's the
> issue.
>
> As for the 500 error, I'm a bit confused. Your remoting server isn't
> running under IIS, right? So is this coming from the web app that's
> attempting to connect to your remote object? If so, I'd either:
>
> a) turn off the custom errors in the web.config file for the web app
> so you can get more info on the error, or
> b) Try to catch the exception that occurs when you first invoke the
> remote object and then print the exception info to the page
>
> Either method should help show what the error is -- who knows, maybe
> it has nothing to do with yout remoting server. I doubt it's related
> to any port contention issue.
>
> Ken
>
>
> "Eddie Stone" <nospam@spammy.org> wrote in message
> news:Xns95773857B232nospamspammyorg@207.46.248.16...
>> Hi Ken,
>>
>> No, I get :
>>
>> 'Could not open connection to the host, connection failed'
>>
>> On a remote pc I get :
>>
>> 500 internal server error , to get more info turn on custom errors in
>> the servers config file.
>>
>> Connection to host lost.
>>
>> Would this be because I'm trying to connect locally on the same port
>> that the server uses ?
>>
>> Thanks.
>>
>>
>>
>> "Ken Kolda" <nospam@spam.com> wrote in news:eV5W#PNqEHA.800
>> @TK2MSFTNGP14.phx.gbl:
>>
>>> On your PC can you telnet directly to the remote object server and
>>> get
>> a
>>> connection?
>>>
>>> Ken
>>>
>>>
>>> "Eddie Stone" <nospam@spammy.org> wrote in message
>>> news:Xns9576E6559F948nospamspammyorg@207.46.248.16...
>>>> Hi Ken,
>>>>
>>>> Thanks very much for your help.
>>>>
>>>> The situtation now is that it works :
>>>>
>>>> - on two different remote pc from a console app , both behind
>>>> firewalls
>>>> - on a website hosted with one isp in the UK.
>>>>
>>>> it does not work :
>>>>
>>>> - on a console client on my own pc
>>>> - on my local website
>>>> - on a different website hosted with another isp in the USA.
>>>>
>>>> If someone could provide me with any insight into this problem it
>> would
>>>> be appreciated. Does 'Activator.GetObject' for example operate on a
>>>> certain port that the USA isp may have closed or something ?
>>>>
>>>> TIA.
>>>>
>>>>> With your remote object server running, go to your web server and
>> try
>>>>> to telnet to it:
>>>>>
>>>>> telnet 213.160.***.*** 361
>>>>>
>>>>> If you don't get a response, then your network's not configured
>>>>> properly. If you're able to get through but your still get errors,
>>>>> then my guess is you're using CAOs (even though you did not
>>>>> indicate this was the case). CAOs won't work in a NAT environment
>>>>> without
>> some
>>>>> additional configuration. For that info, see:
>>>>>
>>>>> http://www.glacialcomponents.com/ArticleDetail/...
>>>>>
>>>>> Hope that helps -
>>>>> Ken
>>>>>
>>>>>
>>>>> "Eddie Stone" <nospam@spammy.org> wrote in message
>>>>> news:Xns9575DC0ABA078nospamspammyorg@207.46.248.16...
>>>>>> I access a remote object from a client like this :
>>>>>>
>>>>>> Message obj = (Message)
>>>>>> Activator.GetObject(typeof(Message),
>>>>>> "http....***.***:361/MyMessage");
>>>>>>
>>>>>> obj.Send(12, "GG", 123);
>>>>>>
>>>>>> It works on a remote computer from a console client however I
>>>>>> would like to
>>>>>> 'send a message' from my website and I get the message :
>>>>>>
>>>>>> The underlying connection was closed: Unable to connect to the
>> remote
>>>>>> server.
>>>>>>
>>>>>> This is also true on my localhost website unless I replace the ip
>>>>>> addess of my machine with 'localhost'
>>>>>>
>>>>>> I am using port forwarding on my router to allow outside access;
>>>>>>
>>>>>> Please tell me if I am not being clear.
>>>>>>
>>>>>> TIA.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Error details :
>>>>>>
>>>>>>
>>>>>> [WebException: The underlying connection was closed: Unable to
>>>>>> connect to the remote server.]
>>>>>> System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
>>>>>> (IMessage reqMsg, IMessage retMsg) +264
>>>>>> System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
>>>> (MessageData
>>>>>> &
>>>>>> msgData, Int32 type) +877
>>>>>> Messaging.Message.Send(Int32 Id, String message, Int32 len) +0
>>>>>> ASP.remoting2_aspx.Page_Load(Object sender, EventArgs e) in c:
>>>>>> \website\remoting2.aspx:24
>>>>>> System.Web.UI.Control.OnLoad(EventArgs e) +67
>>>>>> System.Web.UI.Control.LoadRecursive() +35
>>>>>> System.Web.UI.Page.ProcessRequestMain() +731
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>
>
>
>