Click here to Skip to main content
14,975,862 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I make an application on which user can enter after login through simple aspx page and redirected to a content page of master page the logout button is placed in master page. I use

C#
string encryptedString = CryptoQueryStringHandler.EncryptQueryStrings(queryStrings,
                                        ConfigurationManager.AppSettings["CryptoKey"].ToString());
        Session["encstr"] = encryptedString.ToString();

        Button1.PostBackUrl = string.Concat("Default2.aspx?", Session["encstr"].ToString());

for login
and for logout session["encstr"]=null;
session.abandon();


but after logout user can go to default2 page withuot login just by typing the key previously generated. any solution or anyther method to resolve this.
also querystring is namevalueclass object containing session id and browser detail.

Thanks in advance
Posted

1 solution

you can go for javascript and you can disable the browser back button click..

check the link[^]..hope it will help..
   
Comments
Thanks7872 18-Aug-13 7:45am
   
Why you are running in a race of points? I see frequently that you are either posting totally irrelevant answers or posting just a links. Every time, that may not be the case that OP failed to use google.

In this case also,why should OP disable back button when theres a problem with session?

If i prepared an application where session is created for logged in user. If i disable back button and directly type url in browser,then? You mean it wont open the page? Try it and face the results.
[no name] 19-Aug-13 0:22am
   
why you are taking trouble..OP is there to decide..
Thanks7872 19-Aug-13 0:27am
   
I have a trouble because of irrelevant answer. Code Project has given right to everyone to have objection if something is wrong and i have used it and will be in upcoming days.

We appreciate something if its accurate or provide suggestion if needed according to one's own way.

Whether to accept it or not is totally up to him.
Thanks7872 19-Aug-13 0:33am
   
Can you explain me relevance of that session problem OP has described in question and to disable back button? How disabling back button can solve session issue?
Thanks7872 19-Aug-13 1:09am
   
Counter down voting wont help you much.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900