Results 1 to 7 of 7

Thread: The session object is not working for remote pages

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    275

    The session object is not working for remote pages

    Hi

    I have designed an application in which my pages are scattered to different machine.
    I have to pass a value from one page on one machine to other machine on other machine.

    I have used this:

    Page1_load
    Session("Name")="Abbas Haider"
    Response.Redirect("Page2.aspx")
    End Sub

    Page2_Load
    Response.Redirect(Session("Name"))
    End Sub

    Now Session("Name") is empty for other page

    How can I pass my values?

    Thanks in Advance

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: The session object is not working for remote pages

    How have you 'scattered' page1 and page2 across different machines when they are supposed to be in the same virtual directory?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    275

    Re: The session object is not working for remote pages

    Thats the point I have registered one page in one virtual directory of a machine and the other page in the virtual directory of other machine. I have requirements as such
    Now it cannot take the value of Session object from one page to other. Is there any possibility that I pass my value from one page to other using some socket property or SMTP etc

  4. #4
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    Re: The session object is not working for remote pages

    You won't be able to pass a session from one virtual directory to another. You might want to go with an encrypted URL parameter.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    275

    Re: The session object is not working for remote pages

    Do you have any idea how it might be done?

  6. #6
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: The session object is not working for remote pages

    Can you please tell us exactly what exactly you are trying to pass as Session Variables from 1 site to another? People may have a real practical answer(s) to work under different scenario.

    You may require a different Session State Management Mode called SQL Server Mode, by default it is InProc or In Process. But in your case, it appears that both your servers be capable of connecting to a common DB server.

    A simple search will get you many results.

    Check these links to incorporate SQL mode for session state management:

    http://www.dbazine.com/sql/sql-articles/cook9

    http://msdn.microsoft.com/en-us/library/ms972429.aspx

    http://support.microsoft.com/kb/317604

    Also found this interesting article on implementing Custom Session State Management.
    Show Appreciation. Rate Posts.

  7. #7
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: The session object is not working for remote pages

    If it's non secure data, put it in a cookie. Else you'll have to go for a cookieless session as HG's links may show you. (I didn't click on them, I just assume they're showing cookieless sessions)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width