.NET Remoting, passing objects into methods

我的梦境 提交于 2019-12-05 04:07:31

Actually, .NET remoting is an obsolete technology. You should take a look at WCF instead.

Regarding your actual problem: Your probably running your application in a trust-level that is too low.
The Users class should be serializable, but, if it does not contain any methods that should run at the server, it should not derive from MarshalByRefObject

"are not permitted to be deserialized at this security level." is the significant part.

See the following for the answer

http://www.codeproject.com/Articles/4363/NET-Remoting-in-Simple-English-Really-it-s-that-s

Set the following on both client and server:

typeFilterLevel="Full" in the Formatter tag

Ensure both the server and client configuration set the typeFilterLevel property to Full

or have your User class implement ISerializable

MSDN Documentation on .NET Remoting Serialization Security.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!