Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > scope of web-service
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 14th April 07:19
simon smith
External User
 
Posts: 1
Default scope of web-service



On Mon, 15 Sep 2003 22:47:01 +0200 in article
<e6bfHH8eDHA.900@TK2MSFTNGP11.phx.gbl> in
microsoft.public.dotnet.framework.aspnet.webservic es , "Mr. x"

It's an attribute of the WebMethodAttribute class. From an MSDN
example:
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"]);
}
}

BTW - it took me about 3 minutes to find that in MSDN - much faster
than waiting for someone to answer your post! Getting good at
searching MSDN is a prerequisite for sucessful programming in .NET....

HTH
--
Simon
simon dot smith at snowvalley dot com
"Insomnia is a small price to pay for the stuff you read on UseNet"
  Reply With Quote


  sponsored links


2 15th April 16:16
mr. x
External User
 
Posts: 1
Default scope of web-service



Well,

I have also seen your sample (EnableSession = true),
but this doesn't realy work - try it.

Long time has been gone, and I see from even that conversation search, that
it isn't so so good to do "EnableSession = true" in web-service.
It is better whether I created the connection at each session, and close it
at the end of the method.

There is something I need to configure somewhere in web.config,
but it also new for me, and very compilcated for newbie, so I need also help
about this too.

Thanks
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666