Remoting; firewall warning

M

Marc Gravell

I am using remoting to talk between separate apps *on the same machine*;
currently my server startup code is as below, but it throws the XP firewall
warning dialog. Since I only need to connect locally, is there any way of
preventing this - i.e. can I tell it that I only want to accept local
connections? RemoteAgent is my shared type; the string in App is an alias to
the service.

Thanks in advance,

Marc

public static bool StartServer() {
try {
if (ChannelServices.GetChannel("http") == null) {
ChannelServices.RegisterChannel(new HttpChannel(Port),
false);
}
WellKnownServiceTypeEntry serviceType = new
WellKnownServiceTypeEntry(typeof(RemoteAgent), App,
WellKnownObjectMode.Singleton);
RemotingConfiguration.RegisterWellKnownServiceType(serviceType);
return true;
} catch (System.Net.Sockets.SocketException) {
return false; // server already running
}
}
 
A

abe545

I don't know if you require the use of RemoteAgent/HTTP, but since it
is only on a local machine, can you use Named Pipes for the remoting
channel? It should be much faster, and you won't have to worry about
the XP Firewall. If you are using .NET 2.0, it comes with an included
transport channel to do this: IpcChannel. If you are not, you would
have to implement a custom channel. Hopefully, you will be able to use
this, if not, it was worth a shot.
Abe
 
M

Marc Gravell

Thanks muchly; I will look into this immediately (sounds just like what I
wanted)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top