HighTechTalks DotNet Forums  

Remoting - Singleton & VPN

Dotnet Distributed Applications microsoft.public.dotnet.distributed_apps


Discuss Remoting - Singleton & VPN in the Dotnet Distributed Applications forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
lex3001
 
Posts: n/a

Default Remoting - Singleton & VPN - 03-01-2007 , 01:30 AM






We recvently diagnosed an issue with an existing application that used
remoting and had issues with VPN users as the callback IP address to the
client was not always accurate.

This application was then changed such that now it only uses the Singleton
model.

However, an issue has surfaced where VPN users, if the incorrect IP address
is passed, cause a de-serialization exception on the server for the object
that is passed in to the remot method. If we override and pass in the correct
IP address (where the client can be called back) then the object is
de-serialized just fine.

Any ideas on this? We expected the issue to go away since the Singleton
model would simply open a connection and synchronously wait for the result
over that same connection...

Reply With Quote
  #2  
Old   
Kim
 
Posts: n/a

Default Re: Remoting - Singleton & VPN - 03-04-2007 , 11:23 AM






I was going to submit a similar problem.
I have a similar service that has a singleton object that calls back to
clients.
Everything works fine in a LAN. Not so with VPN.

If the client application resides on the VPN initiated machine, then the
connection fails.
If the server application resides on the VPN intiated machine, then the
connection succeeds.

My server and client programmatically setup the channels, etc.
I can't figure out how to set the customErrors mode="Off" in my
application's config file to get more debugging info.

But I do see, by my logging, that the client does get through to the server,
but when the server accesses the passed in object it eventually
exceptions -- like it can't call back to the client.

Perhaps we have the same issue.

~kim



"lex3001" <lex3001 (AT) discussions (DOT) microsoft.com> wrote

Quote:
We recvently diagnosed an issue with an existing application that used
remoting and had issues with VPN users as the callback IP address to the
client was not always accurate.

This application was then changed such that now it only uses the Singleton
model.

However, an issue has surfaced where VPN users, if the incorrect IP
address
is passed, cause a de-serialization exception on the server for the object
that is passed in to the remot method. If we override and pass in the
correct
IP address (where the client can be called back) then the object is
de-serialized just fine.

Any ideas on this? We expected the issue to go away since the Singleton
model would simply open a connection and synchronously wait for the result
over that same connection...



Reply With Quote
  #3  
Old   
Kim
 
Posts: n/a

Default Re: Remoting - Singleton & VPN - 03-04-2007 , 11:34 AM



I did some research on the web and found others with the same problem.

One solution: specify the VPN Client IP Address in the "machineName"
attribute of the channel.
The example provided by the web page:

IDictionary dctFormatterProperties = new Hashtable();
dctFormatterProperties["typeFilterLevel"] = "Full";
BinaryServerFormatterSinkProvider bsfsp =
new BinaryServerFormatterSinkProvider(dctFormatterProp erties,
null);
IDictionary dctChannelProperties = new Hashtable();
dctChannelProperties["port"] = [the port that you want to
connect to the server on];
dctChannelProperties["machineName"] = [your VPN IP address];
m_chan = new TcpChannel(dctChannelProperties, null, bsfsp);

I tried this and it does work.

~kim


"Kim" <chummers (AT) nospam (DOT) nospam> wrote

Quote:
I was going to submit a similar problem.
I have a similar service that has a singleton object that calls back to
clients.
Everything works fine in a LAN. Not so with VPN.

If the client application resides on the VPN initiated machine, then the
connection fails.
If the server application resides on the VPN intiated machine, then the
connection succeeds.

My server and client programmatically setup the channels, etc.
I can't figure out how to set the customErrors mode="Off" in my
application's config file to get more debugging info.

But I do see, by my logging, that the client does get through to the
server, but when the server accesses the passed in object it eventually
exceptions -- like it can't call back to the client.

Perhaps we have the same issue.

~kim



"lex3001" <lex3001 (AT) discussions (DOT) microsoft.com> wrote in message
news:0F3D7423-7DAF-4CDB-9572-2EE9295A380B (AT) microsoft (DOT) com...
We recvently diagnosed an issue with an existing application that used
remoting and had issues with VPN users as the callback IP address to the
client was not always accurate.

This application was then changed such that now it only uses the
Singleton
model.

However, an issue has surfaced where VPN users, if the incorrect IP
address
is passed, cause a de-serialization exception on the server for the
object
that is passed in to the remot method. If we override and pass in the
correct
IP address (where the client can be called back) then the object is
de-serialized just fine.

Any ideas on this? We expected the issue to go away since the Singleton
model would simply open a connection and synchronously wait for the
result
over that same connection...





Reply With Quote
  #4  
Old   
lex3001
 
Posts: n/a

Default Re: Remoting - Singleton & VPN - 03-04-2007 , 11:41 PM



That's exactly what we wanted to avoid by using a Singleton -- no reason for
the server to have to call back to the client in a separate connection. (Our
original project used asynchronous callbacks and we did this IP address thing
but then decided to change it a bit and use Singleton instead). After some
work, we discovered our issue went away when we changed what classes we were
passing as parameters into the remote method... odd...

"Kim" wrote:

Quote:
I did some research on the web and found others with the same problem.

One solution: specify the VPN Client IP Address in the "machineName"
attribute of the channel.
The example provided by the web page:

IDictionary dctFormatterProperties = new Hashtable();
dctFormatterProperties["typeFilterLevel"] = "Full";
BinaryServerFormatterSinkProvider bsfsp =
new BinaryServerFormatterSinkProvider(dctFormatterProp erties,
null);
IDictionary dctChannelProperties = new Hashtable();
dctChannelProperties["port"] = [the port that you want to
connect to the server on];
dctChannelProperties["machineName"] = [your VPN IP address];
m_chan = new TcpChannel(dctChannelProperties, null, bsfsp);

I tried this and it does work.

~kim


"Kim" <chummers (AT) nospam (DOT) nospam> wrote in message
news:O%23bbEmnXHHA.992 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
I was going to submit a similar problem.
I have a similar service that has a singleton object that calls back to
clients.
Everything works fine in a LAN. Not so with VPN.

If the client application resides on the VPN initiated machine, then the
connection fails.
If the server application resides on the VPN intiated machine, then the
connection succeeds.

My server and client programmatically setup the channels, etc.
I can't figure out how to set the customErrors mode="Off" in my
application's config file to get more debugging info.

But I do see, by my logging, that the client does get through to the
server, but when the server accesses the passed in object it eventually
exceptions -- like it can't call back to the client.

Perhaps we have the same issue.

~kim



"lex3001" <lex3001 (AT) discussions (DOT) microsoft.com> wrote in message
news:0F3D7423-7DAF-4CDB-9572-2EE9295A380B (AT) microsoft (DOT) com...
We recvently diagnosed an issue with an existing application that used
remoting and had issues with VPN users as the callback IP address to the
client was not always accurate.

This application was then changed such that now it only uses the
Singleton
model.

However, an issue has surfaced where VPN users, if the incorrect IP
address
is passed, cause a de-serialization exception on the server for the
object
that is passed in to the remot method. If we override and pass in the
correct
IP address (where the client can be called back) then the object is
de-serialized just fine.

Any ideas on this? We expected the issue to go away since the Singleton
model would simply open a connection and synchronously wait for the
result
over that same connection...






Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.