To maintain session state:
WebMethodAttribute.EnableSession Property
Indicates whether session state is enabled for an XML Web service method.
http://tinyurl.com/2rs6d
Did you follow following example (see url also)?
<%@ WebService Language="C#" Class="Util" %>
using System.Web.Services;
public class Util: WebService {
[ WebMethod(Description="Per session Hit Counter",EnableSession=true)]
public int SessionHitCounter() {
if (Session["HitCounter"] == null) {
Session["HitCounter"] = 1;
}
else {
Session["HitCounter"] = ((int) Session["HitCounter"]) + 1;
}
return ((int) Session["HitCounter"]);
}
}
--
Greetz
Jan Tielens
________________________________
Read my weblog:
http://weblogs.asp.net/jan
"Joshua Ellul" <> wrote in message
news:...
> Hi There,
>
> Could someone tell me how to implement sessions in web services?
>
> I am using the EnableSession property (set to true)... however, the
session
> is not being maintained... is there something I am missing? Perhaps
setting
> a session time out? The client of the web service is an asp.net web form.
>
> Thanks,
>
> Josh
>
>