A
Amir Ghezelbash
Hi every one i want to make sure that my users are always loged in
before doing any thing in any of my wepages
i have added this code to my golab.asax but it loops indefintly ..any
one know why..and how can i stop it for looping?
void Application_BeginRequest(Object sender, EventArgs E) {
if (Customer.Current == null) {
Response.Redirect("Login.aspx");
}
my Customer class is just a wrapper of MemberShipUser class
it returns a correct value i have check it ..but this keeps looping
meaning Login page never loads i understand why ...its becuase when
loging page is called it runs this method and it tells it to load it
again becuase user didnt have a chance to login and Customer is still
null ..but how can i stop this?
before doing any thing in any of my wepages
i have added this code to my golab.asax but it loops indefintly ..any
one know why..and how can i stop it for looping?
void Application_BeginRequest(Object sender, EventArgs E) {
if (Customer.Current == null) {
Response.Redirect("Login.aspx");
}
my Customer class is just a wrapper of MemberShipUser class
it returns a correct value i have check it ..but this keeps looping
meaning Login page never loads i understand why ...its becuase when
loging page is called it runs this method and it tells it to load it
again becuase user didnt have a chance to login and Customer is still
null ..but how can i stop this?