dot net remoting problem
-
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
-
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
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.
-
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.
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
-
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
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.