![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Need a solution with AppDomain in a WCF service Hi, I have a library with all the classes are static and no control on the code to me. I'm implementing an WCF service referencing this library. I'm looking to support multiple client applications to make use of my WCF service which runs in a different mahcine. I want to use WCF callback operations to intimate the progress to each of the client application without client polling the service. I have multiple classes in my WCF service application that make calls to the methods of the library. Around that I have a wrapper class from where the process begins. I created and loaded each instance of this class in an AppDomain by making a GUID for each client. I'm keeping the client callback channels and my wrapper class instances for each client in collection objects. By using the above approach I'm able to process the operations for multiple clients. But next I'm looking to intimate the progress of the requests to each client application. I tried to use delegates but the wrapper class is loaded in another appdomain so I was not able register the event in my service host implementing class. I tried to set the callback channels to AppDomain property using AppDomain.SetData but I'm getting an error that "Callback method InitializeLifetimeService is not supported, this can happen if the method is not marked with OperationContractAttribute or if its interface type is not the target of the ServiceContractAttribute's CallbackContract." I read CrossAppDomainDelegate but not getting how to use for my scenario. Is there any other mechanism with which I can intimate the progress messages to each client. If I can able to get a message to my service host implementation class, I can use the callback channel list to send it to the respective clients. Please can anyone give any points in this regard. I appreciate your help. Thanks... -- Software Engineer |
My System Specs![]() |
| | #2 (permalink) |
| | RE: Need a solution with AppDomain in a WCF service Please can anyone help me in this regard. I appreciate your great help. -- "shiva" wrote: Quote: > Hi, > > I have a library with all the classes are static and no control on the code > to me. I'm implementing an WCF service referencing this library. I'm looking > to support multiple client applications to make use of my WCF service which > runs in a different mahcine. I want to use WCF callback operations to > intimate the progress to each of the client application without client > polling the service. > > I have multiple classes in my WCF service application that make calls to the > methods of the library. Around that I have a wrapper class from where the > process begins. I created and loaded each instance of this class in an > AppDomain by making a GUID for each client. I'm keeping the client callback > channels and my wrapper class instances for each client in collection > objects. > > By using the above approach I'm able to process the operations for multiple > clients. But next I'm looking to intimate the progress of the requests to > each client application. > > I tried to use delegates but the wrapper class is loaded in another > appdomain so I was not able register the event in my service host > implementing class. I tried to set the callback channels to AppDomain > property using AppDomain.SetData but I'm getting an error that > > "Callback method InitializeLifetimeService is not supported, this can happen > if the method is not marked with OperationContractAttribute or if its > interface type is not the target of the ServiceContractAttribute's > CallbackContract." > > I read CrossAppDomainDelegate but not getting how to use for my scenario. Is > there any other mechanism with which I can intimate the progress messages to > each client. If I can able to get a message to my service host implementation > class, I can use the callback channel list to send it to the respective > clients. > > Please can anyone give any points in this regard. I appreciate your help. > > Thanks... > -- |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Vista service pack 2 failed with code 0x8004402f cannot install sp2.solution here.. | Vista installation & setup | |||
| Vista service pack 2 failed with code 0x8004402f cannot install sp2.solution here.. | Vista General | |||
| solution to windows service pack update making icons small | Vista General | |||
| Per-AppDomain CPU Performance Counters | .NET General | |||
| printer not working help. solution for print spooler service not workiing | Vista installation & setup | |||