I am using oracle session provider for asp.net. I am doing small POC using this provider. I have one small web page and multiple images and CSS files. when ever i load the page for every CSS or Image load i see provider is updating the session database. Is there any way we can restrict this functionality as this is going to be a major performnace issue? Appreciate your quick response.
It is my understanding that the Session Provider only does what operations the asp.net session framework or your code tells it to do. It sounds as you're describing a generic Session Provider issue not specific to Oracle, in which case you may have better luck posting in a Microsoft forum.
Thanks Greg for your reply. I am using Oracle provider, it uses <add assembly="Oracle.Web, Version=220.127.116.11, Culture=neutral, PublicKeyToken=89B483F429C47342"/> dll. below is the config entry that i used to access session.
<sessionState mode="Custom" customProvider="MyOracleSessionStateStore">
<add name="MyOracleSessionStateStore" type="Oracle.Web.SessionState.OracleSessionStateStore,Oracle.Web, Version=18.104.22.168, Culture=neutral,PublicKeyToken=89b483f429c47342" connectionStringName="my_sessionstate_app_con_string"/>
This provider is updating session tabes for every file load either CSS, GIF or JS files. below is the error i get when GIF file is getting loaded. In Fidler i can see this response when GIF file is getting loaded. If i remove session provider then GIF file loads with out any issues. Appreciate your quick response.
OracleException (0x80004005): ORA-12519: TNS:no appropriate service handler found]
Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck) +2629
Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src) +80
Oracle.Web.OracleConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +119
Oracle.Web.OracleConnectionHelper.GetConnection(String connectionString) +187
Oracle.Web.SessionState.OracleSessionStateStore.ResetItemTimeout(HttpContext context, String id) +441
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +839
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
ahhh... finally able to resolve the issue by my self. I have created custom class thats inherited from OracleSessionStateStore class and overriden ResetItemTimeout method such that it does not call database for CSS, JS or image requests.
public override void ResetItemTimeout(HttpContext context, string id)
if (context.Request.CurrentExecutionFilePathExtension.ToUpper() == ".CSS" || context.Request.CurrentExecutionFilePathExtension.ToUpper() == ".GIF" || context.Request.CurrentExecutionFilePathExtension.ToUpper() == ".JS")
I thought your complaint was that the provider was accessing the database too much, and that you were having a performance issue. Is that the case? Or is it just that you can't connect, and/or you think the frequent access is causing it? Is it intermittent? Given that it's a simple small page, it seems to be a "can't make a connection" problem rather than a performance problem.
To the best of my knowledge, 12519 is returned from the listener (as opposed to being a client side error in itself). Basically, the db listener couldn't service your request, and you probably want to have your dba look into that.
Is it an XE database? If so, this thread might help (increase processes) .. Re: ORA-12519 using thin JDBC client
To troubleshoot ORA-12519 in general ,
a) what is the actual connection string , pointed to by the connectionStringName="my_sessionstate_app_con_string". Mostly, the "data source=" part of it, but provide the whole thing (xxxx out the uid and pwd).
b) are you able to connect using sqlplus from the same home, using that same tnsnames.ora entry?
c) how many connections are there when you get the error? (select count(*) from v$session where username='<ASPNET_PROVIDER_USERNAME>'; )
Either way, it's likely a problem that will need troubleshooting on the database side, assuming there is not some sort of connection pooling malfunction going that is eating up all the connections.
Hope it helps,
oracle provider is updating session time for every resource that is loaded on a web page like .gif, .js, .css etc. So to resolve this issue i created custom component that inherits from Oracle provider and has overridden methods to not update the session time out.