I use the debuger to step though the program. (Is this a debuger
problem?)
In the debuger window I look at the following vars:
Request.ServerVariables["AUTH_USER"]
Request.ServerVariables["URL"]
I notice that I get guest logons in addition to the user loged in to my box.
I am useing a frameset with multiple .aspx pages.
My code in global.
protected void Session_Start(Object sender, EventArgs e)
{
if (!User.Identity.IsAuthenticated) {
Response.Redirect("hayStupidLogon.aspx");
}
else {
try {
string auth_user =
Request.ServerVariables["AUTH_USER"].Substring(Request.ServerVariables["AUTH
_USER"].IndexOf("\\") + 1);
user loggedInUser = new user(auth_user);
Session["userSettings"] = loggedInUser;
}
catch ( userException ue ) {
//redirect
}
catch ( Exception ex ) {
//redirect
}
}
}
My authentication from web.config
<authentication mode="Windows" />
<!-- AUTHORIZATION
This section sets the authorization policies of the application. You can
allow or deny access
to application resources by user or role. Wildcards: "*" mean everyone, "?"
means anonymous
(unauthenticated) users.
-->
<authorization>
<deny users="?" /> <!-- Allow only athenticated users -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>
"Jerry Negrelli" <je************@nospamdatascientific.com> wrote in message
news:05****************************@phx.gbl...
I attempted to simulate this error and Session_Start only
runs once for me. How do you know that it fires many
session_start events?
JER
-----Original Message-----
I have a frameset with multiple aspx pages whithin it.
I lauch the page and notice that it triggers many
session_start events. Infact I knotice multiple events for the same page.
I am also using windows authentication.
On a few pages I get guest and then the user who is
loged into the computer.
I am writing user information to my session and do not
want it writen 8times.
I can resort to loading my object in the first page but
thought that it wasmore elegent to do so in the session_start event.
Ideas?
-Scott
.