Tell if an object will be local or remote

  • Thread starter Thread starter Tim Haynes
  • Start date Start date
T

Tim Haynes

A question.

Before I instantiate a type I need to know whether it will be local or
remote. Obviously I know the type by a namespace.type string, as I don't
have an instance.



Now, I can tell a WebService proxy by using reflection to see if it's
derived from System.Web.Services.Protocols.SoapHttpClientProtocol, so that's
fine.



The hard bit comes with MarshalByRef types. I need to distinguish between a
MarshalByRef type which is configured for Remoting (eg set up as a well
known type) and one which is not. Any ideas?



Thanks in advance.



Tim
 
Aha! Apologies for bothering the list. I just found
RemotingConfiguration.IsActivtionAllowed and
RemotingConfiguration.IsWellKnownClientType.

Tim
 
Aha. Sorry for bothering the list. Just found the relevant methods in the
RemotingConfiguration class.

Tim
 
Back
Top