Hola a todos.
Os comento he hecho una aplicacion cliente servidor usando remoting y hasta este momento no he tenido ningun problema ya que por ahora estaba ejecutando el servidor en la misma maquina que el cliente, es decir la maquina de desarrollo. El problema me ha surgido cuando he puesto en ejecucion el servidor en otra maquina y es que cuando creo una instancia de un objeto del servidor en el cliente no me salta ningun error pero sin embargo si que veo que la instancia no se ha creado correctamente.
Uso el siguiente codigo para activar la instancia:
GeneralInterface = (
InterfacesGeneral)Activator.GetObject(typeof(InterfacesGeneral),
string.Format("tcp://{0}:{1}/GeneralService.soap", ip, puerto));
el error que detecto pero que no salta es que me dice :
System.Reflection.TargetInvocationException: Se produjo una excepción en el destino de la invocación. ---> System.Runtime.Remoting.RemotingException: Permiso denegado: no se puede llamar a métodos estáticos o que no sean públicos de forma remota.
Server stack trace: en System.Runtime.Remoting.Channels.ChannelServices.DispatchMessage(IServerChannelSinkStack sinkStack, IMessage msg, IMessage& replyMsg)
Exception rethrown at [0]: en System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) en System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) en System.MarshalByRefObject.get_Identity() --- Fin del seguimiento de la pila de la excepción interna --- en System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) en System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) en System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) en System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) en System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) en Microsoft.Office.Tools.Debugger.Tools.TryCreateDebuggerItem(MemberInfo member, Object target, __Item& item)
Le he dado muchisimas vueltas y buscado mucha informacion pero nada de nada, asi que si alguien pudiera echarme una amnita le estaria muy muy agradecido ya que debo hacer que funcione el servidor en una maquina especifica y poueda ser llamada desde cualquier otra maquina sin problemas.
Un saludo y gracias de antemano
|