Re[2]: Проблемма с IPC Remoting
От: Аноним  
Дата: 12.05.08 07:29
Оценка:
А если попробовать вот такой код?

На сервере:

..
SecurityIdentifier si = new SecurityIdentifier(WellKnownSidType.WorldSid, null);
IdentityReference ir = si.Translate(typeof(NTAccount));

IDictionary props = new Hashtable();
props["name"] = channelName;
props["portName"] = channelName;
props["tokenImpersonationLevel"] = TokenImpersonationLevel.Identification;
props["includeVersions"] = false;
props["strictBinding"] = false;
props["secure"] = true;
props["authorizedGroup"] = ir.Value;

IpcServerChannel channel = new IpcServerChannel(props, null);
ChannelServices.RegisterChannel(channel, true);
RemotingConfiguration.RegisterWellKnownServiceType(objectType, SERVER_CHANNEL_NAME, WellKnownObjectMode.Singleton);
..

На клиенте:
..
string channelName = CLIENT_CHANNEL_NAME + "_" + Guid.NewGuid().GetHashCode();
IDictionary props = new Hashtable
{
{"name", channelName},
{"impersonationLevel", TokenImpersonationLevel.Identification}
};
IpcClientChannel clientChannel = new IpcClientChannel(props, null);

ChannelServices.RegisterChannel(clientChannel, true);
..
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.