Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
Hi,

I am using URL Routing for display user profiles. I am using master page and child pages. The profile page is a child page and the master page has a login status control. When I login (say user x) through the modal popup which is in the master page itself, i can browse the site with smoothly and reach the routed page. When I log out from the routed page using the login status i get redirected to my home page as required as my login status also is logged out. If i login from this homepage now with another username say y, i get logged in successfully.

The problem is that when I again use the routed to get to the routed page, I get the previous user x still logged in. When i come to homepage I see user y logged in. So I have two sessions working; one in the routed page, and other in the whole of the website.

I will be obliged if anyone can point out the session problem. :)

The the login/logout link button is in the master page. So when two users are logged in according to my problem: one in routed page, other in the other pages; If i click logout, the user in the routed page remains logged in whereas the other logged in user is logged out.

So the session is stucked in the routed page itself. Thus the problem is related to URL routing at the routed page. This page is kind of maintaining its own session and is not allowing me to log out the user.
Any Solution???
Posted
Comments
Sandeep Mewara 21-Jan-11 1:01am    
Whats your logout code? Can you share?
[no name] 25-Jan-11 13:47pm    
Logout is used by Login Status Control.
I used refresh method and then redirect method to redirect to a page where i used:
Session.Abandon();
Session.Clear();
But all in vain.
[no name] 25-Jan-11 13:53pm    
URL Routing causes headers to update, that maybe one of the cause. I don't want to use the stateserver mode. It appears as if the URL Routed child page maintains a different session of its own irrespective of the website. When i logout, the user logs out form the website but remains logged in the routed page. This is to be noted that after logging out when I use the full physical URL to got to the page, the login status shows logged out status, but if i try to reach the same page through the hackable url, then I find the previous user logged in.

1 solution

I believe you have to clear the session cache on the site. Otherwise, sessions remain active until you actually shut down the browser instance that started that particular session (or maybe even all existing browser instances).
 
Share this answer
 
Comments
[no name] 25-Jan-11 13:53pm    
Hi,

Thanks for replying. I am using visual studio 2010 for development and have cleared the cache of browsers, but it didn't help.

URL Routing causes headers to update, that maybe one of the cause. I don't want to use the stateserver mode.
It appears as if the URL Routed child page maintains a different session of its own irrespective of the website. When i logout, the user logs out form the website but remains logged in the routed page.
This is to be noted that after logging out when I use the full physical URL to got to the page, the login status shows logged out status, but if i try to reach the same page through the hackable url, then I find the previous user logged in.

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