title: web service statefulness
body: <p>I have two wcf services with the same interface hosted in IIS using http binding. Both have only three methods: </p>
  
  <ol>
  <li><p><code>OpenFile(userid)</code> which creates or opens userid.txt. </p></li>
  <li><p><code>Write(userid, X)</code> which writes X into the file</p></li>
  <li><p><code>Close(userid)</code> which closes the file</p></li>
  </ol>
  
  <p><code>InstanceContextMode =InstanceContextMode.PerSession</code> is used for Service B.</p>
  
  <p>Service A:</p>
  
  <ul>
  <li><p>Is it stateless (service technically does not need to remember the user id, it's tracked by the client)  or stateful (the service operation is like a state machine. Client must call the methods in a particular order)?</p></li>
  <li><p>If HTTPS binding is used, is it stateful?</p></li>
  </ul>
  
  <p>Service B:</p>
  
  <ul>
  <li>Is it stateless, stateful (because IIS session is used)? </li>
  </ul>
  
  <p>I guess a more general question is whether the statefulness of the web service depends on how it's designed and implemented or how it is hosted? Is there like a "checklist" that I can go through to determine if my web service is categorize as stateless or stateful?</p>
  
  <p>Thanks</p>