G
Guest
I must be doing something fundamentally wrong here. This is what I have in
web.config:
<sessionState cookieName="SOMENAME" mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;user id=sa;password="
cookieless="false" timeout="15" />
<globalization requestEncoding="ISO-8859-1"
responseEncoding="ISO-8859-1" />
<pages theme="DefaultTheme" enableSessionState="true"
enableViewState="true" enableViewStateMac="true" validateRequest="true" />
I also set the EnableSessionState on the pages explicitly. In one of the
pages I have this code:
protected void Page_Load(object sender, EventArgs e)
{
if (Session["AAAAA"] == null)
{
Session["AAAAA"] = 0;
}
else
{
Session["AAAAA"] = (int)Session["AAAAA"] + 1;
}
}
If I keep refreshing this page, the Session ID is always different and the
Session.IsNewSession is always true. Even though I can see that the value of
0 is set, on every request the session is regenerated... Why would that
happen?
Thank you,
Iulian
web.config:
<sessionState cookieName="SOMENAME" mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;user id=sa;password="
cookieless="false" timeout="15" />
<globalization requestEncoding="ISO-8859-1"
responseEncoding="ISO-8859-1" />
<pages theme="DefaultTheme" enableSessionState="true"
enableViewState="true" enableViewStateMac="true" validateRequest="true" />
I also set the EnableSessionState on the pages explicitly. In one of the
pages I have this code:
protected void Page_Load(object sender, EventArgs e)
{
if (Session["AAAAA"] == null)
{
Session["AAAAA"] = 0;
}
else
{
Session["AAAAA"] = (int)Session["AAAAA"] + 1;
}
}
If I keep refreshing this page, the Session ID is always different and the
Session.IsNewSession is always true. Even though I can see that the value of
0 is set, on every request the session is regenerated... Why would that
happen?
Thank you,
Iulian