Thanks, but I had already Googled for that and read it before I posted
my request. The article is old, and also covers VB.NET only.
I did some more investigation on my own, and found this sample to
work. However, I am not sure if I will run into any issues doing
this:
[WebMethod(Description="HeyNow",EnableSession=true)]
public string SessionShow()
{
if ( HttpContext.Current.Session["incrementMe"] == null )
{
HttpContext.Current.Session["incrementMe"] = "x";
}
else
{
HttpContext.Current.Session["incrementMe"] += " x ";
}
return HttpContext.Current.Session.SessionID +
Session["incrementMe"].ToString() + " ";
}
I do see multple " x " values, so I think the Session is sticking, but
I am not sure. What is a good way to test this?
Thanks.
On Thu, 29 Jul 2004 03:24:20 GMT, lukezhan@online.microsoft.com
[quoted text, click to view] ([MSFT]) wrote:
>Hello,
>
>Regarding the issue, you may take a look at following article:
>
>Using ASP.NET Session State in a Web Service
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/h
>tml/service08062002.asp
>
>The auther provide a solution for the issue.
>
>Hope this help,
>
>Luke