title: .net windows service as a state server
body: <p>i'd like to create a windows service that would be accessible via WCF from a web application.
  The workflow would be:</p>
  
  <ol>
  <li>Windows Service starts and would hold a default value in memory.</li>
  <li><p>A web app would connect the windows service via wcf and take the value and after some processing set the value back in the memory.</p></li>
  <li><p>In a while would happend the same as in point 2., and so on,so on </p></li>
  </ol>
  
  <p>This value would be hold only in memory.</p>
  
  <p>The point is I dont know where put the variable that would be hold in the memory of the windows service.There is a Service class wich is instancied in a Program class wich is static class. So whats the best place to put a variable that would be hold in the memory as long as the service is running ?</p>
  
  <p>And second question,is it correct to reference the exe of the windows service in a DLL ?? </p>