.comment-link {margin-left:.6em;}
Marc Boizeau's blog
Tuesday, August 30, 2005
  .net webservice session
Maybe it is obvious but I've seen the question on a forum;
Q:"How to make the session collection work for a .net webservice like for asp.net? "

A:"Just put the following before the web method:"
[ WebMethod(Description="Desc",EnableSession=true)]

thats all folks!

hope this helps.

comments are welcome

Ok I've posted this a few time ago. And it still works. But, the session collection is not a real session objectin this case. It is instanciate just before the web method call, but I never seen when it is uninstanciate. For instance the "end_session" event never fire!
Also, I experiment troubles while debuging an object stored in this collection for a web method.
So, use this the least you can and do not expect this to be a good equivalent to the session collection in classical ASP .Net.
Comments: Post a Comment

<< Home
You are a developer and work with Oracle and Microsoft technologies? Have a look!
How to:
Use updatable views in Access
Get data in Excel from Oracle 1
Get data in Excel from Oracle 2
Draw the Mandelbrot set using C#
Use the "Grouping Sets" SQl Syntax
Use the "Rollup" SQl Syntax
Use the "Rank over" SQl Syntax

Winform, Web Services & credential
back to work
just a link
self description
A web crawler(regular expressions and httprequest...
call an Oracle stored proc with oledb .net
Updating two lines with one data adapter.
oracle functions
October 2004 / November 2004 / December 2004 / January 2005 / February 2005 / March 2005 / April 2005 / June 2005 / July 2005 / August 2005 / September 2005 / December 2005 / February 2006 / December 2006 / March 2009 /

Powered by Blogger