Web Services, like web apps, are truly stateless, which means that even if
you have a "session", it's a disconnected session. The clients connect, call
a method (or methods) and then disconnects. You can use the enableSession
parameter of the WebMethod attribute, but I don't think that you are going
to get the results that you want. By default, ADO.NET should be pooling your
connections, but I am not certain if that is the case when it comes to
Oracle and their "less than perfect" .Net providers (I know for a fact that
the SQL Server provider does connection pooling). You might want to contact
MSFT and/or Oracle about the provider perfomance and see if there is a way
to enable connection pooling to the database.
HTH,
Bill Priess, MCP
> Hello,
>
[quoted text clipped - 33 lines]
> Please help,
> Thanks in advance
oraclevsmicrosoft - 30 Aug 2005 17:57 GMT
I didn't try it for pooling a connection (Some .net connection object
are pooled automatically) , but I store session objects like this :
protected void Session_Start(Object sender, EventArgs e)
{
Session.Add("USER_INFO", new myUserinfoObject(User));
}
In order to make this works for my web method I put the following:
....
[ WebMethod(Description="blabla",EnableSession=true) ]
public DataSet getDs()
{
...
myUserinfoObject= (UserinfoObject)Session["USER_INFO"] ;
.....
You may try this for your connection.
Hope this helps
http://oraclevsmicrosoft.blogspot.com