Проблема такова:
запущены 2 сервиса, общаются с помощью IPC
на одном запущен сервер:
RemotingConfiguration.ApplicationName = "Video.Service";
IpcVideoServer = new IpcServerChannel("Video");
ChannelServices.RegisterChannel(IpcVideoServer, true);
RemotingConfiguration.RegisterActivatedServiceType(typeof(VideoBuffer));
а на другом — соединение:
_Buffer = (VideoBuffer)Activator.CreateInstance(typeof(VideoBuffer), null, new object[] { new UrlAttribute("ipc://Video") });
при попытке соединится получаем Exception:
Type:
System.Reflection.TargetInvocationException
Message:
Exception has been thrown by the target of an invocation.
Source:
mscorlib
StackTrace:
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at Bkc.Lpr.Service.VideoGrabber.CreateVideo()
TargetSite:
System.Object CreateInstance(System.RuntimeType, Boolean, Boolean, Boolean ByRef, System.RuntimeMethodHandle ByRef, Boolean ByRef)
InnerException:
Type:
System.Runtime.Remoting.RemotingException
Message:
An error occurred while processing the request on the server: System.Security.SecurityException: Не удается открыть маркер безопасности анонимного уровня.
at System.Security.Principal.WindowsIdentity.GetCurrentInternal(TokenAccessLevels desiredAccess, Boolean threadOnly)
at System.Security.Principal.WindowsIdentity.GetCurrent()
at System.Runtime.Remoting.Channels.Ipc.IpcServerTransportSink.ServiceRequest(Object state)
The Zone of the assembly that failed was:
MyComputer
Source:
mscorlib
StackTrace:
Server stack trace:
at System.Runtime.Remoting.Channels.Ipc.IpcServerHandler.ReadToEndOfHeaders(BaseTransportHeaders headers)
at System.Runtime.Remoting.Channels.Ipc.IpcClientHandler.ReadHeaders()
at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.Runtime.Remoting.Activation.IActivator.Activate(IConstructionCallMessage msg)
at System.Runtime.Remoting.Activation.LocalActivator.DoRemoteActivation(IConstructionCallMessage ctorMsg)
at System.Runtime.Remoting.Activation.LocalActivator.Activate(IConstructionCallMessage ctorMsg)
at System.Runtime.Remoting.Activation.AppDomainLevelActivator.Activate(IConstructionCallMessage ctorMsg)
at System.Runtime.Remoting.Messaging.ClientContextTerminatorSink.SyncProcessMessage(IMessage reqMsg)
at System.Runtime.Remoting.Activation.ActivationServices.Activate(RemotingProxy remProxy, IConstructionCallMessage ctorMsg)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(IMessage reqMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Video.VideoBuffer..ctor()
TargetSite:
Void HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)
Подскажите что не так и как с этим бороться