title: Preserve objects between wcf calls?
body: <p>This should be fairly basic, but say I have a Public property as local variable on my WCF service, and I set this in one call to the service. Is there a way to preserve that data for another call to the service? (Without writing the data to xml or a db, and re-referencing it or anything like that)</p>
  
  <p>Executing the calls from the Winform:</p>
  
  <pre><code>Public Class ClientSideWinForm
  
      Private proxy As ServiceReference.Client
  
      Private Sub Client_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
          proxy = New ServiceReference.Client
      End Sub
  
      Private Sub btnStartTests_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStartTests.Click
          addToTxtResults("Try Chk Program Valid...")
          Try
              addToTxtResults(proxy.RequestChkValidProgram("Some-serial-number")) 'returns true or false and instanciates the object server side
  
              addToTxtResults(proxy.RequestFirstName()) ' returns nothing
          Catch ex As Exception
              addToTxtResults(ex.ToString)
          End Try
      End Sub
  End Class
  </code></pre>
  
  <p>The service itself (dumbed down a bit, but the behaivor still exists):</p>
  
  <pre><code>Public Class Service
      Implements IService
  
  Public Property X As String
  
  Function RequestChkValidProgram(ByVal strSerialNumber As String) As Integer Implements IService.RequestChkValidProgram
          X = "hello"
  End Function
  
  Function RequestFirstName() As String Implements IService.RequestFirstName
      Return X
  End Function
  
  End Class
  </code></pre>