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. General Programming
  3. C#
  4. dot net remoting problem

dot net remoting problem

Scheduled Pinned Locked Moved C#
4 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.
  • T Offline
    T Offline
    Tauseef A
    wrote on last edited by
    #1

    Hi guys This is the scenario of a remoting application . I have a library named sales , in which there are three classes named CD,Books,Medicine, these classes are derived from class named Items and this items class is derived from an interface named Idomain and this interface have three properties String name{get;set;},int code{Get;set;] , double price{get;set}, in items class these three properties are implemented. All classes are serializable also. I have another interface named IappDomain which contains a method named List getitems(); Now here I have a class named Post which is derived from marshelbyref and also from Previous defined interface named IappDomain, in this class I am implementing the getitems method of the IappDomain interface . On my remoting server my wellknownservice type is Post, with wellknownobjecctmode.singlecall. And on my client side I have a dll in which the Iappdomain interface resides, But when I call the method getitems from this interface on my client side I get an exception that sales dll is not found ,, why is that ? Do I have to use object factory , I don’t want to put my sales library on the client side coz I have put the interface there , but why it asks for the sales dll,, kndly help me out, Thanks in advance

    hello

    K 1 Reply Last reply
    0
    • T Tauseef A

      Hi guys This is the scenario of a remoting application . I have a library named sales , in which there are three classes named CD,Books,Medicine, these classes are derived from class named Items and this items class is derived from an interface named Idomain and this interface have three properties String name{get;set;},int code{Get;set;] , double price{get;set}, in items class these three properties are implemented. All classes are serializable also. I have another interface named IappDomain which contains a method named List getitems(); Now here I have a class named Post which is derived from marshelbyref and also from Previous defined interface named IappDomain, in this class I am implementing the getitems method of the IappDomain interface . On my remoting server my wellknownservice type is Post, with wellknownobjecctmode.singlecall. And on my client side I have a dll in which the Iappdomain interface resides, But when I call the method getitems from this interface on my client side I get an exception that sales dll is not found ,, why is that ? Do I have to use object factory , I don’t want to put my sales library on the client side coz I have put the interface there , but why it asks for the sales dll,, kndly help me out, Thanks in advance

      hello

      K Offline
      K Offline
      Karthik Kalyanasundaram
      wrote on last edited by
      #2

      Here you can do two things to solve this issue. One thing is that you can add the Sales dll in ur client app, but you don't need that fix. Another thing is that you can make the class Items derive from MarhsalByRef and make the return value of getitems() return list of Idomain. The way you have done requires serialization of classes Items, CD, Books and Medicine objects in the list from server side, and require deserialization at client side, to deserialize it at client side requires the Sales.dll there.

      T 1 Reply Last reply
      0
      • K Karthik Kalyanasundaram

        Here you can do two things to solve this issue. One thing is that you can add the Sales dll in ur client app, but you don't need that fix. Another thing is that you can make the class Items derive from MarhsalByRef and make the return value of getitems() return list of Idomain. The way you have done requires serialization of classes Items, CD, Books and Medicine objects in the list from server side, and require deserialization at client side, to deserialize it at client side requires the Sales.dll there.

        T Offline
        T Offline
        Tauseef A
        wrote on last edited by
        #3

        thank you very much for you concideration, here i have made some changes, now i have created an interface named IDomain which contains all the previouls defined properties and with the additional method named list getitems(); ok, now i have derived my items class with this interface plus marshlebyrefobj,ok now it is working , coz i have put an assemnly on my clent which contains the Idomain interface. but why it was not working previousl? and another thing can u help me please i also have to publich this method through web service when i create and run web service method it says the interface named IDomain cannot be serialized why is that? thanks in advance

        hello

        K 1 Reply Last reply
        0
        • T Tauseef A

          thank you very much for you concideration, here i have made some changes, now i have created an interface named IDomain which contains all the previouls defined properties and with the additional method named list getitems(); ok, now i have derived my items class with this interface plus marshlebyrefobj,ok now it is working , coz i have put an assemnly on my clent which contains the Idomain interface. but why it was not working previousl? and another thing can u help me please i also have to publich this method through web service when i create and run web service method it says the interface named IDomain cannot be serialized why is that? thanks in advance

          hello

          K Offline
          K Offline
          Karthik Kalyanasundaram
          wrote on last edited by
          #4

          Sorry Dude, I am not that good at WebServices eventhough I had developed some webservices using PHP5. As far as I know, Webservices are state-less, what I think is you need to make ur classes serializable and return that instances of that classes from webservice method.

          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