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:


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

Popular posts from this blog

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

Azure DocumentDB Owner resource does not exist

SQL Server 2008 - High Memory Usage