R
Robin Mark Tucker
Hi,
How can I store state on the server for each instance of a proxy I use on my
client?
For example if I have, say, as hash table in my services.vb class, with a
web method that creates it:
private m_Hash As Dictionary(Of String, Integer)
<WebMethod()> _
Public Sub CreateHash()
m_Hash.Clear()
m_Hash = new Dictionary(Of String, Integer)
End Sub
<WebMethod()> _
Public Sub AddToHash(ByVal theString as String, ByVal theInteger As
Integer)
m_Hash.Add ( theString, theInteger)
End Sub
and then in my client application, instantiate the generated proxy class:
Dim m_Proxy As New MYSERVICE.service
m_Proxy.CreateHash ()
m_Proxy.AddToHash ( "Example", "1" )
Will the hashtable created in the service when "CreateHash" is executed
still be there when "AddToHash" is executed? As m_Proxy is client side, I'm
wondering if an instance of the service class on the server exists for as
long as it does. What is the "best" practice way to store state like this?
Thanks
Robin Tucker
How can I store state on the server for each instance of a proxy I use on my
client?
For example if I have, say, as hash table in my services.vb class, with a
web method that creates it:
private m_Hash As Dictionary(Of String, Integer)
<WebMethod()> _
Public Sub CreateHash()
m_Hash.Clear()
m_Hash = new Dictionary(Of String, Integer)
End Sub
<WebMethod()> _
Public Sub AddToHash(ByVal theString as String, ByVal theInteger As
Integer)
m_Hash.Add ( theString, theInteger)
End Sub
and then in my client application, instantiate the generated proxy class:
Dim m_Proxy As New MYSERVICE.service
m_Proxy.CreateHash ()
m_Proxy.AddToHash ( "Example", "1" )
Will the hashtable created in the service when "CreateHash" is executed
still be there when "AddToHash" is executed? As m_Proxy is client side, I'm
wondering if an instance of the service class on the server exists for as
long as it does. What is the "best" practice way to store state like this?
Thanks
Robin Tucker