【发布时间】:2009-09-11 06:10:10
【问题描述】:
我在我的服务器上使用这样的东西:
TcpServerChannel channel = new TcpServerChannel(settings.RemotingPort);
ChannelServices.RegisterChannel(channel, true);
RemotingServices.Marshal(myRemoteObject, "myRemoteObject");
我想订阅某种事件,以便当远程客户端连接到 myRemoteObject 时,我可以检查 Thread.CurrentPrincipal.Identity.Name 来决定是否授权他。
目前我正在对 myRemoteObject 的每个暴露的远程方法进行授权检查,这很混乱......
【问题讨论】:
-
您好,您是否知道 .NET Remoting 已被弃用以支持 WCF?
-
嗨!是的,我听说过,但我公司的环境仍然卡在 .NET 2.0 中 :(
标签: c# .net remoting .net-remoting