Global variables in Web Service class
hi,
i wanted write ws had 6 clients. how can share variable between these clients ?
what wanted do, have ws store time stamp of time newest data retreived.
i want this:
if 1. client connected and the data fetched therefor time stamp stored , data. 2. client come in , retreive time stamp? or 1. client have own "instance" of ws class ?
sorry english bad.
i wanted write ws had 6 clients. how can share variable between these clients ?
what wanted do, have ws store time stamp of time newest data retreived.
i want this:
namespace mywebservice { public class mywebservice : system.web.services.webservice { private string myname = "unassigned"; private dataset waitingdataset; private datetime waitingtimestamp; |
if 1. client connected and the data fetched therefor time stamp stored , data. 2. client come in , retreive time stamp? or 1. client have own "instance" of ws class ?
sorry english bad.
you store it in application object.
application.add("waitingtimestamp",waitingtimestamp);
and
datetime dttimestamp=(datetime)application["waitingtimestamp"];
Archived Forums A-B > ASMX Web Services and XML Serialization
Comments
Post a Comment