Click to See Complete Forum and Search --> : Security Issues with .Net Remoting


stardv
February 10th, 2005, 10:28 AM
I am new to Remoting. Could somebody help please?
I have remote object (MyObject) that is server activated. It has a method : lets say MyMethod();
When I activate the object, everything works well except when I pass parameters to the object which are custom data type.
For example if I do

MyObject.MyMethod(string c) - WORKS WELL

However if I do
MyObject.MyMethod2(customClass MyClass) – it gives me security error.

Any suggestions please???

raghuvamshi
February 10th, 2005, 10:53 AM
Your custom class needs to derive from System.MarshalByRefObject

check this link for more info

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconremotableobjects.asp

hth

stardv
February 10th, 2005, 11:02 AM
It is derived but it stil does not work
Any other ideas?

V.Lorz
February 11th, 2005, 02:53 AM
What kind of error? What's the error message?

torrud
February 11th, 2005, 06:58 AM
1. Where do you store the implementation of myClass?
If you store myClass at your client machine and you try to use it on the server machine you will get a security exception, because network activities are not fully trusted. The same error should be occuring if you try to start an application from a network device.

2. Why do you not use interfaces instead of whole objects?
If you use interfaces instead of objects, you do need to transfer the whole object through the network. Only the method calls and the results will be transfered.

stardv
February 15th, 2005, 09:28 AM
I do use interface, however I found out what the problem is

I needed to set TypeFilterLevel to Full

Thanks