CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2004
    Location
    New Jersey, USA
    Posts
    341

    Security Issues with .Net Remoting

    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???

  2. #2
    Join Date
    Nov 2004
    Location
    Virginia, The lovers' state
    Posts
    64

    Re: Security Issues with .Net Remoting

    Your custom class needs to derive from System.MarshalByRefObject

    check this link for more info

    http://msdn.microsoft.com/library/de...bleobjects.asp

    hth

  3. #3
    Join Date
    Jun 2004
    Location
    New Jersey, USA
    Posts
    341

    Re: Security Issues with .Net Remoting

    It is derived but it stil does not work
    Any other ideas?

  4. #4
    Join Date
    Oct 2004
    Posts
    5

    Re: Security Issues with .Net Remoting

    What kind of error? What's the error message?

  5. #5
    Join Date
    May 2003
    Location
    Germany
    Posts
    936

    Re: Security Issues with .Net Remoting

    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.

  6. #6
    Join Date
    Jun 2004
    Location
    New Jersey, USA
    Posts
    341

    Re: Security Issues with .Net Remoting

    I do use interface, however I found out what the problem is

    I needed to set TypeFilterLevel to Full

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured