Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Help - Remoting

Help - Remoting

Scheduled Pinned Locked Moved ASP.NET
helpquestionsysadmintutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vishwjeet
    wrote on last edited by
    #1

    Hi.. I am using the following code for my remoting example. When I use MarshalByRefObject it works fine. using System; namespace ns_application { namespace ns_authentication { public class cls_registeruser : MarshalByRefObject { private string _username; public cls_registeruser(string username) { _username = username; Console.WriteLine("Registered User :" + _username); } public cls_registeruser() { _username = "NULL"; Console.WriteLine("Username is " + _username); } ~cls_registeruser() { Console.WriteLine("User deleted" + _username); } public string username { get{return _username;} } } } } But when I try to use [Serializable] it shows error "Trying to create a proxy to an unbound type". using System; namespace ns_application { namespace ns_authentication { [Serializable] public class cls_registeruser { private string _username; public cls_registeruser(string username) { _username = username; Console.WriteLine("Registered User :" + _username); } public cls_registeruser() { _username = "NULL"; Console.WriteLine("Username is " + _username); } ~cls_registeruser() { Console.WriteLine("User deleted" + _username); } public string username { get{return _username;} } } } } As far as I know : "MarshalByRefObject" will give me a reference to an object created on the server. All the execution will take place on the server. "Serializable" will send to me the object state, and the execution will be done at the client machine itself. But at some places I see the following usage : [Serializable] public class_name : MarshalByRefObject What does this mean? Also, if [Serializable] is there, what is the use of "ISerializable" interface. Waiting for responses guyz... I have googled a lot already but am not getting a clear picture.

    A 1 Reply Last reply
    0
    • V vishwjeet

      Hi.. I am using the following code for my remoting example. When I use MarshalByRefObject it works fine. using System; namespace ns_application { namespace ns_authentication { public class cls_registeruser : MarshalByRefObject { private string _username; public cls_registeruser(string username) { _username = username; Console.WriteLine("Registered User :" + _username); } public cls_registeruser() { _username = "NULL"; Console.WriteLine("Username is " + _username); } ~cls_registeruser() { Console.WriteLine("User deleted" + _username); } public string username { get{return _username;} } } } } But when I try to use [Serializable] it shows error "Trying to create a proxy to an unbound type". using System; namespace ns_application { namespace ns_authentication { [Serializable] public class cls_registeruser { private string _username; public cls_registeruser(string username) { _username = username; Console.WriteLine("Registered User :" + _username); } public cls_registeruser() { _username = "NULL"; Console.WriteLine("Username is " + _username); } ~cls_registeruser() { Console.WriteLine("User deleted" + _username); } public string username { get{return _username;} } } } } As far as I know : "MarshalByRefObject" will give me a reference to an object created on the server. All the execution will take place on the server. "Serializable" will send to me the object state, and the execution will be done at the client machine itself. But at some places I see the following usage : [Serializable] public class_name : MarshalByRefObject What does this mean? Also, if [Serializable] is there, what is the use of "ISerializable" interface. Waiting for responses guyz... I have googled a lot already but am not getting a clear picture.

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      is it anyhow related to ASP.NET :confused::confused:

      Abhishek Sur


      My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

      **Don't forget to click "Good Answer" if you like to.

      V 1 Reply Last reply
      0
      • A Abhishek Sur

        is it anyhow related to ASP.NET :confused::confused:

        Abhishek Sur


        My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

        **Don't forget to click "Good Answer" if you like to.

        V Offline
        V Offline
        vishwjeet
        wrote on last edited by
        #3

        Yes it is .. unless there is a specific message board for .net remoting .

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups