2

I created a service with callback. This is working fine. Now I'd like to make this service durable. My problem is to get the context and load it again later. I call the service like this:

class UserManagementProxy : IUserManagementCallback, IDisposable
{
    IUserManagement pipeProxy = null;
    public InfoMessage Login(string username, string password)
    {
        DuplexChannelFactory<IUserManagement> pipeFactory = new DuplexChannelFactory<IUserManagement>(new InstanceContext(this), new NetTcpContextBinding(), new EndpointAddress(Properties.Settings.Default.Adress));
        InfoMessage message = null;
        try
        {
            pipeProxy = pipeFactory.CreateChannel();
            LoginResult result = pipeProxy.Login(Guid.Parse("b06cbb6f-1c99-4e02-91a7-f7d778b29790"), username, password);
            return result.Status;
        }
        catch (Exception ex)
        {

        }
    }
}

Where do I have to save the context now and how can I do this? I tried to do some stuff with clientbase ... but I think this is an other solution. What is the correct way to acces the same service instance again?

Thanks for any help Max

ZoomVirus
  • 615
  • 7
  • 22

0 Answers0