[lnkForumImage]
TotalShareware - Download Free Software

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


 

Arne Bernhardt

11/5/2004 4:19:00 PM

Hello,
i reduced my problem to a demo-program:
(which you can download at
http://service.gmx.net/mc/K7UnMaoROYhMr0O4zrY5... (please click the
button "GMX Mediacenter starten"))
I´ve got a forms-client and a simple SingleCall-Service hostet for tests in
console or localhost (WinXP IIS 5.x) or wich produces my problem on
W2003-Server with IIS 6.

/*test-connection on localhost, wich works fine*/
this._oSingleCall =
(RUAInterfaces.ISingleCall)Activator.GetObject(typeof(RUAInterfaces.ISingleCall), "http://localhost:80/RemotingTest/RUAService/CSingleCall.soap");
/*produktiv-connection which doesn´t work*/
//this._oSingleCall =
(RUAInterfaces.ISingleCall)Activator.GetObject(typeof(RUAInterfaces.ISingleCall), "http://www.WEB-SERVER.de/RUAService/CSingleCall....);

I test the connection ike this:

/*this always works pretty good*/
if(this._oSingleCall.sTestString != "Connected")
{
this._bConnected = false;
}
else
{
this._bConnected = true;
}

Then I call a method on the server wich should return an other "new"
MashalByRef-Object:

RUAInterfaces.IMainInterface oMainMenue =
this._oSingleCall.oGetBusinessObject();

So far so good. When I debug there is nothing uncommon (it´s something like
a virual proxy - object)

Then i try to get an attribute/property from that object:

/*and here is my PROBLEM: this doesn´t work hostet on W2003 Server with IIS
6*/
MessageBox.Show(oMainMenue.sTest);

And now i get a Remoting-Exception for which i can´t get any description
(turning custom-errors off doesn´t seem to work).

When I host the application on my computer, the application works also fine,
so it´s no localhost-thing.
My fist object "this._oSingleCall" works very good, i can even make
database-requests. But the instance of IMainInterface oMainMenue does not
work on W2003 with IIS6.

Can anbody please help me.
Greetings

Arne Bernhardt
1 Answer

Ken Kolda

11/6/2004 1:32:00 AM

0

My guess is that your Windows 2003 server is behind a router which is
performing NAT. As a result, the ObjRef that gets returned by the server
when you call oGetBusinessObject() has an IP address embedded in it which is
only valid on the servers local network. Here's an article that describes
the problems of using CAOs across local network boundaries:

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

Hope that helps -
Ken


"Arne Bernhardt" <ArneBernhardt@discussions.microsoft.com> wrote in message
news:E26C0FB0-D77E-41A2-8050-285A08A3F8CB@microsoft.com...
> Hello,
> i reduced my problem to a demo-program:
> (which you can download at
> http://service.gmx.net/mc/K7UnMaoROYhMr0O4zrY5... (please click the
> button "GMX Mediacenter starten"))
> I´ve got a forms-client and a simple SingleCall-Service hostet for tests
in
> console or localhost (WinXP IIS 5.x) or wich produces my problem on
> W2003-Server with IIS 6.
>
> /*test-connection on localhost, wich works fine*/
> this._oSingleCall =
>
(RUAInterfaces.ISingleCall)Activator.GetObject(typeof(RUAInterfaces.ISingleC
all), "http://localhost:80/RemotingTest/RUAService/CSingleCall.soap");
> /*produktiv-connection which doesn´t work*/
> //this._oSingleCall =
>
(RUAInterfaces.ISingleCall)Activator.GetObject(typeof(RUAInterfaces.ISingleC
all), "http://www.WEB-SERVER.de/RUAService/CSingleCall....);
>
> I test the connection ike this:
>
> /*this always works pretty good*/
> if(this._oSingleCall.sTestString != "Connected")
> {
> this._bConnected = false;
> }
> else
> {
> this._bConnected = true;
> }
>
> Then I call a method on the server wich should return an other "new"
> MashalByRef-Object:
>
> RUAInterfaces.IMainInterface oMainMenue =
> this._oSingleCall.oGetBusinessObject();
>
> So far so good. When I debug there is nothing uncommon (it´s something
like
> a virual proxy - object)
>
> Then i try to get an attribute/property from that object:
>
> /*and here is my PROBLEM: this doesn´t work hostet on W2003 Server with
IIS
> 6*/
> MessageBox.Show(oMainMenue.sTest);
>
> And now i get a Remoting-Exception for which i can´t get any description
> (turning custom-errors off doesn´t seem to work).
>
> When I host the application on my computer, the application works also
fine,
> so it´s no localhost-thing.
> My fist object "this._oSingleCall" works very good, i can even make
> database-requests. But the instance of IMainInterface oMainMenue does not
> work on W2003 with IIS6.
>
> Can anbody please help me.
> Greetings
>
> Arne Bernhardt