HighTechTalks DotNet Forums  

How do you set a remoting client to use impersonationprogrammatically?

Dotnet Framework (Remoting) microsoft.public.dotnet.framework.remoting


Discuss How do you set a remoting client to use impersonationprogrammatically? in the Dotnet Framework (Remoting) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
jim.craig43@tiscali.co.uk
 
Posts: n/a

Default How do you set a remoting client to use impersonationprogrammatically? - 11-22-2007 , 02:58 PM






I know how to do this with a config file, trouble is I'm not using the
config file settings ( for various reasons that I won't go into here)
- there seems to be no documentation on this anywhere. I would have
thought that tokenImpersonationLevel would be a property of the
TcpChannel class - but nit has no such property. Anyone got any ideas?

Reply With Quote
  #2  
Old   
jim.craig43@tiscali.co.uk
 
Posts: n/a

Default Re: How do you set a remoting client to use impersonationprogrammatically? - 11-22-2007 , 03:32 PM






On Nov 22, 8:58 pm, jim.crai... (AT) tiscali (DOT) co.uk wrote:
Quote:
I know how to do this with a config file, trouble is I'm not using the
config file settings ( for various reasons that I won't go into here)
- there seems to be no documentation on this anywhere. I would have
thought that tokenImpersonationLevel would be a property of the
TcpChannel class - but nit has no such property. Anyone got any ideas?
Like this. apparently.....

IDictionary prop = new Hashtable();
prop["protectionLevel"] =
System.Net.Security.ProtectionLevel.EncryptAndSign ;
prop["tokenImpersonationLevel"] =
System.Security.Principal.TokenImpersonationLevel. Impersonation;
prop["secure"] = true;
TcpClientChannel channel = new
TcpClientChannel(prop,null);
ChannelServices.RegisterChannel(channel);


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.