I wanted to write a WS that had about 6 Clients. How can I share a variable between all these clients
What I wanted to do, is have the WS store a Time stamp of the time that the newest data was retreived.
I want to do it like this:
namespace myWebService { public class myWebService : System.Web.Services.WebService { private string myName = "Unassigned"; private DataSet WaitingDataSet; private DateTime WaitingTimeStamp; |
If the 1. Client connected and the data would be fetched therefor the time stamp stored and the data. Could the 2. Client then come in and retreive that time stamp Or does the 1. Client have its own "instance" of the WS class
Sorry my english is so bad.

Global variables in Web Service class
JRC Systems
Stuart Bray
I was hoping I could store a TimeStamp on the Server and Each Client would have its TimeStamp.
Then the Client would pass in its TimeStamp, the Server would look at it compare it to the TimeStamp on the server and if the Client had the same TimeStamp return null. Else if the Server had a newer TimeStamp return the Data that the server had stored in memory and then also update both TimeStamps and return one to the client.
Something in this direction.
Sorry my bad english, trying to make myself understandable. I am trying to create some sort of a cache logic on our Application Server Module(IIS server). Perhaps a better place for this logic would be in the Business Components DLL
吴培
I added static in front and that seemed to help me out.
private static DateTime WaitingTimeStamp;
Am I wrong
gjwehnes
Stefoon
runar lyngset
Application.Add("WaitingTimeStamp",WaitingTimeStamp);
and
DateTime dtTimeStamp=(DateTime)Application["WaitingTimeStamp"];