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);