D
Dean
I have notice a couple of other threads here that depict the same problem I
am having: I can't get session state to work.
I wrote a component class to do all of my database access and use it in both
Windows .net and ASP.net applications. I was dealing with it in a single
aspx page (using codebehind) where it worked fine for this particular app.
Now I have the instantiation in global.asax in the session_start:
dim myDBProc as PhotoDBProcs = new PhotoDBProcs(...connection string )
In one of the pages that uses this I have:
dim myDBProc = ctype(Session("myDBProc"), PhotoDBProcs)
But this gets flagged with an error saying that session state can only be
used when enablesessionstate is set to true. I do have it set to true on
this page as follows:
<%@ Page Language="vb" EnableSessionState="true" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="DBAPhotoQuery.WebForm1"%>
Also my web.config file says:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
Any idea why this is not working
thanks,
Dean
am having: I can't get session state to work.
I wrote a component class to do all of my database access and use it in both
Windows .net and ASP.net applications. I was dealing with it in a single
aspx page (using codebehind) where it worked fine for this particular app.
Now I have the instantiation in global.asax in the session_start:
dim myDBProc as PhotoDBProcs = new PhotoDBProcs(...connection string )
In one of the pages that uses this I have:
dim myDBProc = ctype(Session("myDBProc"), PhotoDBProcs)
But this gets flagged with an error saying that session state can only be
used when enablesessionstate is set to true. I do have it set to true on
this page as follows:
<%@ Page Language="vb" EnableSessionState="true" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" Inherits="DBAPhotoQuery.WebForm1"%>
Also my web.config file says:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>
Any idea why this is not working
thanks,
Dean