You must Sign In to post a response.
  • Category: ASP.Net MVC

    Keep session active in one URL when user in navigated to another URL

    My site name www.test.com. I have a hyperlink in one of the page. If the user click the hyperlink they will be navigated to different site www.newsite.com. Now the user starts doing some activity in www.newsite.com. As long as they are active in www.newsite.com, session should not expire in www.test.com. For example, if the user is active for 2 hours in www.newsite.com then the session should be active for 2 hrs in www.test.com even though i have set the session time as 20 mins in web.config.

    How to achieve this?

    I searched in web.In most places Keepalive functionality is suggested but in that they are using iframe. I hope client will not accept loading the newsite.com URL form test,.com site because of security issues.

    Please suggest in detail.
  • #768594
    Hi,

    You can access the session varriable continuously for long time but the thing is if the session variable ideal time is more than your time limit(20min) then it will expire until that you can use. Once session expire you have to create new session again.

    --------------------------------------------------------------------------------
    Give respect to your work, Instead of trying to impress your boss.

    N@veen
    Blog : http://naveens-dotnet.blogspot.in/

  • #768620
    I tried the following but it didn't work:

    In the www.newsite.com i have kept an image tag in the .aspx page as follows:
    <img src="http://test.com/Content/Images/sampleImage.gif" alt="Check"/>

    The image is only one pixel. Now whenever i refresh the page in www.newsite.com, it will hit www.test.com to load the image right? in this case the session in www.test.com will be reinitialized?

    Please suggest


Sign In to post your comments