By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,397 Members | 2,552 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,397 IT Pros & Developers. It's quick & easy.

Session_Start triggered for each requested aspx page

P: n/a
Is there any particular reason why the Session_Start() event gets triggerend
by each aspx page request?

Details:
Windows XP Pro SP2
..NET Framework v1.1.4322
C#
SessionState set to mode InProc in web.config
Session timeout set to 20 minutes

My Session_Start():
protected void Session_Start(Object sender, EventArgs e)
{
Session["LanguageId"] =
ConfigurationSettings.AppSettings["DefaultLanguageId"];
Session["Culture"] =
ConfigurationSettings.AppSettings["DefaultCulture"];
}

I have a frameset containing a banner frame - contents frame and a main
frame. I have set a breakpoint on the first line in my Session_Start.

When I start the application, the Session_Start gets triggerend once. For
each consequent requested aspx page loaded in the main frame by clicking on
a link in the contents frame will create for some reason a new session.
Nothing specials happens in these pages that might cause this behaviour.

Any help or leads in the right direction are stronly appreciated.

Gabriel Lozano-Morán
Nov 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Is the browser set to allow session cookies? If not, that is why.

"Gabriel Lozano-Morán" <ga************@no-spam.com> wrote in message
news:OW**************@TK2MSFTNGP12.phx.gbl...
Is there any particular reason why the Session_Start() event gets
triggerend by each aspx page request?

Details:
Windows XP Pro SP2
.NET Framework v1.1.4322
C#
SessionState set to mode InProc in web.config
Session timeout set to 20 minutes

My Session_Start():
protected void Session_Start(Object sender, EventArgs e)
{
Session["LanguageId"] =
ConfigurationSettings.AppSettings["DefaultLanguageId"];
Session["Culture"] =
ConfigurationSettings.AppSettings["DefaultCulture"];
}

I have a frameset containing a banner frame - contents frame and a main
frame. I have set a breakpoint on the first line in my Session_Start.

When I start the application, the Session_Start gets triggerend once. For
each consequent requested aspx page loaded in the main frame by clicking
on a link in the contents frame will create for some reason a new session.
Nothing specials happens in these pages that might cause this behaviour.

Any help or leads in the right direction are stronly appreciated.

Gabriel Lozano-Morán

Nov 19 '05 #2

P: n/a
Hello Marina

Following your lead that it had to do with cookies I have set in my
web.config cookieless to "false" which was first set to "true" to try if
that works and it does. Is there a reason why the sessionstate is not
persistent when using cookieless sessions.

Gabriel Lozano-Morán
"Marina" <so*****@nospam.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Is the browser set to allow session cookies? If not, that is why.

"Gabriel Lozano-Morán" <ga************@no-spam.com> wrote in message
news:OW**************@TK2MSFTNGP12.phx.gbl...
Is there any particular reason why the Session_Start() event gets
triggerend by each aspx page request?

Details:
Windows XP Pro SP2
.NET Framework v1.1.4322
C#
SessionState set to mode InProc in web.config
Session timeout set to 20 minutes

My Session_Start():
protected void Session_Start(Object sender, EventArgs e)
{
Session["LanguageId"] =
ConfigurationSettings.AppSettings["DefaultLanguageId"];
Session["Culture"] =
ConfigurationSettings.AppSettings["DefaultCulture"];
}

I have a frameset containing a banner frame - contents frame and a main
frame. I have set a breakpoint on the first line in my Session_Start.

When I start the application, the Session_Start gets triggerend once. For
each consequent requested aspx page loaded in the main frame by clicking
on a link in the contents frame will create for some reason a new
session. Nothing specials happens in these pages that might cause this
behaviour.

Any help or leads in the right direction are stronly appreciated.

Gabriel Lozano-Morán


Nov 19 '05 #3

P: n/a
If you are saying cookieless is working, then your question is why it would
not work when you are using session state with cookies?

The reason is that if the browser is set to not accept session cookies, the
server cannot check the value of this session cookie to get the sessionid.
Since it can't get the session id, it just creates a new session every time.

"Gabriel Lozano-Morán" <ga************@no-spam.com> wrote in message
news:uY**************@tk2msftngp13.phx.gbl...
Hello Marina

Following your lead that it had to do with cookies I have set in my
web.config cookieless to "false" which was first set to "true" to try if
that works and it does. Is there a reason why the sessionstate is not
persistent when using cookieless sessions.

Gabriel Lozano-Morán
"Marina" <so*****@nospam.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Is the browser set to allow session cookies? If not, that is why.

"Gabriel Lozano-Morán" <ga************@no-spam.com> wrote in message
news:OW**************@TK2MSFTNGP12.phx.gbl...
Is there any particular reason why the Session_Start() event gets
triggerend by each aspx page request?

Details:
Windows XP Pro SP2
.NET Framework v1.1.4322
C#
SessionState set to mode InProc in web.config
Session timeout set to 20 minutes

My Session_Start():
protected void Session_Start(Object sender, EventArgs e)
{
Session["LanguageId"] =
ConfigurationSettings.AppSettings["DefaultLanguageId"];
Session["Culture"] =
ConfigurationSettings.AppSettings["DefaultCulture"];
}

I have a frameset containing a banner frame - contents frame and a main
frame. I have set a breakpoint on the first line in my Session_Start.

When I start the application, the Session_Start gets triggerend once.
For each consequent requested aspx page loaded in the main frame by
clicking on a link in the contents frame will create for some reason a
new session. Nothing specials happens in these pages that might cause
this behaviour.

Any help or leads in the right direction are stronly appreciated.

Gabriel Lozano-Morán



Nov 19 '05 #4

P: n/a
No I meant that cookieless (url mangling) is not working and with cookies it
works.

cookieless="true" => not working (this would mean no cookies = no session)
cookieless="false"=> works (this means use cookies)

Gabriel

"Marina" <so*****@nospam.com> wrote in message
news:ON**************@TK2MSFTNGP15.phx.gbl...
If you are saying cookieless is working, then your question is why it
would not work when you are using session state with cookies?

The reason is that if the browser is set to not accept session cookies,
the server cannot check the value of this session cookie to get the
sessionid. Since it can't get the session id, it just creates a new
session every time.

"Gabriel Lozano-Morán" <ga************@no-spam.com> wrote in message
news:uY**************@tk2msftngp13.phx.gbl...
Hello Marina

Following your lead that it had to do with cookies I have set in my
web.config cookieless to "false" which was first set to "true" to try if
that works and it does. Is there a reason why the sessionstate is not
persistent when using cookieless sessions.

Gabriel Lozano-Morán
"Marina" <so*****@nospam.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Is the browser set to allow session cookies? If not, that is why.

"Gabriel Lozano-Morán" <ga************@no-spam.com> wrote in message
news:OW**************@TK2MSFTNGP12.phx.gbl...
Is there any particular reason why the Session_Start() event gets
triggerend by each aspx page request?

Details:
Windows XP Pro SP2
.NET Framework v1.1.4322
C#
SessionState set to mode InProc in web.config
Session timeout set to 20 minutes

My Session_Start():
protected void Session_Start(Object sender, EventArgs e)
{
Session["LanguageId"] =
ConfigurationSettings.AppSettings["DefaultLanguageId"];
Session["Culture"] =
ConfigurationSettings.AppSettings["DefaultCulture"];
}

I have a frameset containing a banner frame - contents frame and a main
frame. I have set a breakpoint on the first line in my Session_Start.

When I start the application, the Session_Start gets triggerend once.
For each consequent requested aspx page loaded in the main frame by
clicking on a link in the contents frame will create for some reason a
new session. Nothing specials happens in these pages that might cause
this behaviour.

Any help or leads in the right direction are stronly appreciated.

Gabriel Lozano-Morán



Nov 19 '05 #5

P: n/a
Problem solved. In the content frame I was using the Microsoft Treeview web
control and the navigateUrl was set using the application path + page name
thus by doing this I removed the session id from the url... Thanks for
helping me on this one. Been working for 13 hours, time to go home.... :s

Gabriel Lozano-Morán

"Gabriel Lozano-Morán" <ga************@no-spam.com> wrote in message
news:OG**************@tk2msftngp13.phx.gbl...
No I meant that cookieless (url mangling) is not working and with cookies
it works.

cookieless="true" => not working (this would mean no cookies = no session)
cookieless="false"=> works (this means use cookies)

Gabriel

"Marina" <so*****@nospam.com> wrote in message
news:ON**************@TK2MSFTNGP15.phx.gbl...
If you are saying cookieless is working, then your question is why it
would not work when you are using session state with cookies?

The reason is that if the browser is set to not accept session cookies,
the server cannot check the value of this session cookie to get the
sessionid. Since it can't get the session id, it just creates a new
session every time.

"Gabriel Lozano-Morán" <ga************@no-spam.com> wrote in message
news:uY**************@tk2msftngp13.phx.gbl...
Hello Marina

Following your lead that it had to do with cookies I have set in my
web.config cookieless to "false" which was first set to "true" to try if
that works and it does. Is there a reason why the sessionstate is not
persistent when using cookieless sessions.

Gabriel Lozano-Morán
"Marina" <so*****@nospam.com> wrote in message
news:Od**************@TK2MSFTNGP10.phx.gbl...
Is the browser set to allow session cookies? If not, that is why.

"Gabriel Lozano-Morán" <ga************@no-spam.com> wrote in message
news:OW**************@TK2MSFTNGP12.phx.gbl...
> Is there any particular reason why the Session_Start() event gets
> triggerend by each aspx page request?
>
> Details:
> Windows XP Pro SP2
> .NET Framework v1.1.4322
> C#
> SessionState set to mode InProc in web.config
> Session timeout set to 20 minutes
>
> My Session_Start():
> protected void Session_Start(Object sender, EventArgs e)
> {
> Session["LanguageId"] =
> ConfigurationSettings.AppSettings["DefaultLanguageId"];
> Session["Culture"] =
> ConfigurationSettings.AppSettings["DefaultCulture"];
> }
>
> I have a frameset containing a banner frame - contents frame and a
> main frame. I have set a breakpoint on the first line in my
> Session_Start.
>
> When I start the application, the Session_Start gets triggerend once.
> For each consequent requested aspx page loaded in the main frame by
> clicking on a link in the contents frame will create for some reason a
> new session. Nothing specials happens in these pages that might cause
> this behaviour.
>
> Any help or leads in the right direction are stronly appreciated.
>
> Gabriel Lozano-Morán
>



Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.