G
Grandpa Pete
How can I share resources across all users of a web service for read/write
access.
*Situation* *one*:
I want to have an in memory counter that all users of the webservice could
access. Call it g_count.
Then I create a web method called Update_g_count.
public int g_count( int incr )
{
g_count += incr;
return g_count;
}
So, how do I define g_count so it's global across all users?
*Situation* *two*:
I have an XML file that I want to load into an XmlDocument.
I want to set up a Web Method that uses XPath to find a node, and then
change the value of the InnerText.
How do I put this XmlDocument into memory so all users can update it without
collisions when they try to update the nodes?
Do I need to use a mutex ?
How can this mutex apply across all users of the web service ?
Do I put it in global.asax ?
access.
*Situation* *one*:
I want to have an in memory counter that all users of the webservice could
access. Call it g_count.
Then I create a web method called Update_g_count.
public int g_count( int incr )
{
g_count += incr;
return g_count;
}
So, how do I define g_count so it's global across all users?
*Situation* *two*:
I have an XML file that I want to load into an XmlDocument.
I want to set up a Web Method that uses XPath to find a node, and then
change the value of the InnerText.
How do I put this XmlDocument into memory so all users can update it without
collisions when they try to update the nodes?
Do I need to use a mutex ?
How can this mutex apply across all users of the web service ?
Do I put it in global.asax ?