J
Jayme.Pechan
I realize this is a complicated scenerio to explain so hopefully it will
make sense. I have an object that I create an instance of on a remote
server. I can call functions on this object with no problem but one of the
things that I'd like to do is create an instance of a different object on my
local server and pass the reference to the remote server object as a
parameter which in turn would occasionally call functions on this new local
object. When I pass the interface as a parameter to a function or in this
case try to assign it to a property in the remote object, I get an error.
Note that this same code works on the same machine across app domains. The
object, of course, is derived from MarshalByRefObj but even so, it gives me
an error...
"Because of security restrictions, the type System.Runtime.Remoting.ObjRef
cannot be accessed."
Unfortunately I do not know what security it is referring to here. I'm not
sure if this is even a valid description for the problem. Does anyone know
enough about remoting or the related security to know what it is referring
to here? Thanks.
Here is the stack trace when the exception is thrown.
Server stack trace:
at
System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type
type)
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.ParseObject(ParseRecord
pr)
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.Parse(ParseRecord
pr)
at
System.Runtime.Serialization.Formatters.Soap.SoapHandler.StartChildren()
at System.Runtime.Serialization.Formatters.Soap.SoapParser.ParseXml()
at System.Runtime.Serialization.Formatters.Soap.SoapParser.Run()
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler
handler, ISerParser serParser)
at
System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream
serializationStream, HeaderHandler handler)
at
System.Runtime.Remoting.Channels.CoreChannel.DeserializeSoapRequestMessage(Stream
inputStream, Header[] h, Boolean bStrictBinding, TypeFilterLevel
securityLevel)
at
System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage(IServerChannelSinkStack
sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream
requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders,
Stream& responseStream)
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 [...]set_logging(Logging value)
...
-Jayme
make sense. I have an object that I create an instance of on a remote
server. I can call functions on this object with no problem but one of the
things that I'd like to do is create an instance of a different object on my
local server and pass the reference to the remote server object as a
parameter which in turn would occasionally call functions on this new local
object. When I pass the interface as a parameter to a function or in this
case try to assign it to a property in the remote object, I get an error.
Note that this same code works on the same machine across app domains. The
object, of course, is derived from MarshalByRefObj but even so, it gives me
an error...
"Because of security restrictions, the type System.Runtime.Remoting.ObjRef
cannot be accessed."
Unfortunately I do not know what security it is referring to here. I'm not
sure if this is even a valid description for the problem. Does anyone know
enough about remoting or the related security to know what it is referring
to here? Thanks.
Here is the stack trace when the exception is thrown.
Server stack trace:
at
System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type
type)
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.ParseObject(ParseRecord
pr)
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.Parse(ParseRecord
pr)
at
System.Runtime.Serialization.Formatters.Soap.SoapHandler.StartChildren()
at System.Runtime.Serialization.Formatters.Soap.SoapParser.ParseXml()
at System.Runtime.Serialization.Formatters.Soap.SoapParser.Run()
at
System.Runtime.Serialization.Formatters.Soap.ObjectReader.Deserialize(HeaderHandler
handler, ISerParser serParser)
at
System.Runtime.Serialization.Formatters.Soap.SoapFormatter.Deserialize(Stream
serializationStream, HeaderHandler handler)
at
System.Runtime.Remoting.Channels.CoreChannel.DeserializeSoapRequestMessage(Stream
inputStream, Header[] h, Boolean bStrictBinding, TypeFilterLevel
securityLevel)
at
System.Runtime.Remoting.Channels.SoapServerFormatterSink.ProcessMessage(IServerChannelSinkStack
sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream
requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders,
Stream& responseStream)
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 [...]set_logging(Logging value)
...
-Jayme