I have created a session in asp.net C# page, i’m storing user uniqueid in session like this,
Session["userid"] = clsUser.UniqueId;
and checking this unique id on each page and redirecting if session is null. But if i copy the users current URL in other tab of IE, it is not redirecting to login page. Instead it is maintaining session across the browser subtabs.
How can i redirect to login page if user try to copy the url in another sub tab?
Multiple tabs are in the same session – that’s normal behavior. Perhaps you could add a second tracking HiddenField to the page or use ViewState to ensure that the postback is from the same page it came from?
I don’t think that there’s any real way to prevent this.