WCF Service worker thread communicate with ServiceHost thread?

Why not implement singleton and init this property after service creation. After that you can always refer to it private static MyService m_ServiceInstance; public static MyService ServiceInstance { get { return m_ServiceInstance; } }.

Why not implement singleton and init this property after service creation. After that you can always refer to it. Private static MyService m_ServiceInstance; public static MyService ServiceInstance { get { return m_ServiceInstance; } }.

I suggest turning the code that opens a VPN connection and polls for information into its own singleton service and hosting it withing the same (or different) Windows NT Service. The client facing service calls the VPN service using WCF. The VPN service would only poll when client facing services are "listening".

This has a couple advantages: WCF will take care of the complexities of creating service instances and managing threads. (Within the singleton you will likely still have to implement locking, but that's all. ) The VPN polling service is no longer tightly coupled to the client facing service.

This gives you flexibility in deployment and the ability to support new use cases in the future.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions