C
cmrchs
Hi,
I have following function in a WebService-class :
[WebMethod(EnableSession=true)]
public int Count()
{
if ( null == Session["mycounter"] )
Session["mycounter"] = 0;
else
m_counter = (int)Session["mycounter"];
Session["mycounter"] = ++m_counter;
return m_counter;
}
'm_counter' is a datamember of the class.
When calling the WS-function from IExplorer several times do I get an incremented count as return value : OK
.... but invoking the same WS-function from a ConsoleApp always returns me the same value of 1 ???
result = calc.Count();
result = calc.Count();
Console.WriteLine("Count : {0}", result);
how come ?
thnx
Chris
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
I have following function in a WebService-class :
[WebMethod(EnableSession=true)]
public int Count()
{
if ( null == Session["mycounter"] )
Session["mycounter"] = 0;
else
m_counter = (int)Session["mycounter"];
Session["mycounter"] = ++m_counter;
return m_counter;
}
'm_counter' is a datamember of the class.
When calling the WS-function from IExplorer several times do I get an incremented count as return value : OK
.... but invoking the same WS-function from a ConsoleApp always returns me the same value of 1 ???
result = calc.Count();
result = calc.Count();
Console.WriteLine("Count : {0}", result);
how come ?
thnx
Chris
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...