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

Re: Tell if an object will be local or remote by Tim

Tim
Thu Jan 27 18:37:24 CST 2005

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

Tim


"Tim Haynes" <t_j_haynes@hotmail.com> wrote in message
news:us$Pt3MBFHA.136@TK2MSFTNGP14.phx.gbl...
>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
>
>



Re: Tell if an object will be local or remote by Tim

Tim
Thu Jan 27 18:39:42 CST 2005

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

Tim


"Tim Haynes" <t_j_haynes@hotmail.com> wrote in message
news:us$Pt3MBFHA.136@TK2MSFTNGP14.phx.gbl...
>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
>
>