X
Xarky
Hi,
I am writing a small application and I am facing the 2 following
problems.
1)
I have implemented an authentication screen (simple username and
password), and when user signs in, I use the following and redirect
user to a main page
Session["connected"] = username;
When user tries to visit the main page, without first having signed
in, in the Page_Load, I check the value of the Session["connected"]
and if its empty, I redirect user back to authentication screen.
Now when user signs out, Session["connected"] is set "" and user is
redirected to authentication screen.
When user have at leasted visted main page once in authenticated
state, and then in non-authenticated state, he tries again to visit
the main page, he is not being directed to authentication screen, but
entering main page normally. I tried to do some debugging in the
method Page_Load, but at the time descrived in this paragraph, it is
not entering in this method.
Is there any other method that I should handle/overload?
2)
I have followed this link to do a drop-down menu:
http://msdn.microsoft.com/library/d...ta/html/OfficeFrontPageCreateDropDownMenu.asp
Now one of the menu Items is Sign Out. In this Sign out I have done a
link to the Authentication screen described earlier. Now before I
redirect the user I require to do some operations like
Session["connected"] = "";
Can this be done with some scripting. I have done something similar
to this in another language, previously.
I hope someone understands my problems and helps me out.
Thanks in Advance
I am writing a small application and I am facing the 2 following
problems.
1)
I have implemented an authentication screen (simple username and
password), and when user signs in, I use the following and redirect
user to a main page
Session["connected"] = username;
When user tries to visit the main page, without first having signed
in, in the Page_Load, I check the value of the Session["connected"]
and if its empty, I redirect user back to authentication screen.
Now when user signs out, Session["connected"] is set "" and user is
redirected to authentication screen.
When user have at leasted visted main page once in authenticated
state, and then in non-authenticated state, he tries again to visit
the main page, he is not being directed to authentication screen, but
entering main page normally. I tried to do some debugging in the
method Page_Load, but at the time descrived in this paragraph, it is
not entering in this method.
Is there any other method that I should handle/overload?
2)
I have followed this link to do a drop-down menu:
http://msdn.microsoft.com/library/d...ta/html/OfficeFrontPageCreateDropDownMenu.asp
Now one of the menu Items is Sign Out. In this Sign out I have done a
link to the Authentication screen described earlier. Now before I
redirect the user I require to do some operations like
Session["connected"] = "";
Can this be done with some scripting. I have done something similar
to this in another language, previously.
I hope someone understands my problems and helps me out.
Thanks in Advance