dotnet remoting:
I am using IIS Server and .NET Remoting. The code is written using C#.
The code works fine when the client is on the same network as the
server. When the client is moved to a different network, the code
fails. However, the "codes = Manager.GetIrCodeRatingsByCdm(3517);" call
works fine. It returns a list of codes. I wrote debug statements on the
server to verify the server code actually was executed. Indeed it was.
The problem is the line "bool required = !code.Optional;". After a very
long wait, this causes the exception, "The Underlying connection was
closed: Unable to connect to the remote server". It acts as though the
server went away but it hasn't. I placed debug statements in the code
on the server for "code.Optional". This code was never hit. It just
causes the exception. Defaults are used on the client and for the
server. "code.Optional" simply returns a value. There is no major
processing going on so some kind of time out doesn't seem like the
problem. Any ideas?
The client code:
IIrCodeRating code = null;
ArrayList codes = null;
HttpChannel channel = new HttpChannel();
ChannelServices.RegisterChannel(channel);
string url = "
http://updater.control4.com:8086/BizFactory.soap";
Manager = (IBizFactory)Activator.GetObject( typeof(IBizFactory), url );
try
{
codes = Manager.GetIrCodeRatingsByCdm(3517);
if (codes.Count > 0)
{
code = (IIrCodeRating)codes[0];
bool required = !code.Optional;
}
}
catch (Exception ex)
{
MessageBox.Show("Verify SQL/Application Server is running. Message: " +
ex.Message,"Error: FillCommandListFromWeb (GetIrCodeRatingsByCdm)");
}