Wednesday 19 August 2015

What is difference between Single call and SingleTon

 Right now Remote class is registered under Remote Server in SingleTon Mode ,in this mode whenever the first request comes from first client an object of RemoteClass is created and it’s reference is provided to the client, From then for any new request coming from a new client server provides reference of same object that is already created, so all clients share same object because of this changes made by a client gets reflected to other clients.
·        To changes the mode of our application from SingleTon to SingleCall follow the below process.
  1. 1.      Open visual studio command prompt, go into the folder where RemoteServer.exe was present and Un-install it using  installutil tool.

C:\<folder>\RemoteServer\RemoteServer\bin\Debug>installutil –u RemoteServer.exe
  1. 2.      Now open Remote Server project in VS and under it change the mode from Singleton to SingleCall with in the 3rd statement of OnStart method and rebuild the project.
  2. 3.      Re-install RemoteServer from VS Command prompt again.

           C:\<folder>\RemoteServer\RemoteServer\bin\Debug>installutil  RemoteServer.exe
  1. 4.      Open the service’s window and start the server for first time .
  2. 5.      Run the Remote Client application and Check the behavior by calling the say hello method.

No comments:

Post a Comment