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.ServerV ariables["AUTH_USER"]
Request.ServerV ariables["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(O bject sender, EventArgs e)
{
if (!User.Identity .IsAuthenticate d) {
Response.Redire ct("hayStupidLo gon.aspx");
}
else {
try {
string auth_user =
Request.ServerV ariables["AUTH_USER"].Substring(Requ est.ServerVaria bles["AUTH
_USER"].IndexOf("\\") + 1);
user loggedInUser = new user(auth_user) ;
Session["userSettin gs"] = loggedInUser;
}
catch ( userException ue ) {
//redirect
}
catch ( Exception ex ) {
//redirect
}
}
}
My authentication from web.config
<authenticati on 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
(unauthenticate d) users.
-->
<authorizatio n>
<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************ @nospamdatascie ntific.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
.