My application has an HTTP channel to run a method on a remote computer. I'm able to do that with one computer by using the line:
System.Runtime.Remoting.RemotingConfiguration.RegisterWellKnownClientType(
typeof(RemoteObject), uri);
I also need to run another method on another computer. So I used the same line as above but changed the URI to the name of the other remote computer. However, I am getting this RemotingException
:
Attempt to redirect activation of type 'RemoteClass.RemoteObject, RemoteObject' which is already redirected.
I've done some research on this exception but haven't found too much information about it. I've looked at the documentation for the exception, but don't really understand it. I tried to find the cause of the error, and learned that if I change the parameter typeof(RemoteObject)
such that typeof()
is applied to an object of a different type, it works fine. But I still need to use RemoteObject
as the type in order to run a method from that class. Is there a work around for this?