Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Session Retention using WebRequest + WebResponse

Session Retention using WebRequest + WebResponse

Scheduled Pinned Locked Moved ASP.NET
questionsysadmin
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tristan Rhodes
    wrote on last edited by
    #1

    Hi, I'm trying to implement a WAP front end for a Website, but the website i am trying to wrap requires an active session for users to use it. I've created the WAP pages on a seperate server and have the requests sent to a worker process that processes the live Webpages. However, using the WebRequest and WebResponse, i can't seem to maintain an active session (I'm re-creating a new instace for each request). How would i go about retaining a session between multiple requests? OR, how can i use a single request object to make multiple consecutive request? Any examples or articles would be appreciated. Cheers Tris

    I V 2 Replies Last reply
    0
    • T Tristan Rhodes

      Hi, I'm trying to implement a WAP front end for a Website, but the website i am trying to wrap requires an active session for users to use it. I've created the WAP pages on a seperate server and have the requests sent to a worker process that processes the live Webpages. However, using the WebRequest and WebResponse, i can't seem to maintain an active session (I'm re-creating a new instace for each request). How would i go about retaining a session between multiple requests? OR, how can i use a single request object to make multiple consecutive request? Any examples or articles would be appreciated. Cheers Tris

      I Offline
      I Offline
      indianet
      wrote on last edited by
      #2

      You must retrieve the CookieContainer of the first response (HttpWebRequest object) and retain the CookieContainer for the subsequent requests

      1 Reply Last reply
      0
      • T Tristan Rhodes

        Hi, I'm trying to implement a WAP front end for a Website, but the website i am trying to wrap requires an active session for users to use it. I've created the WAP pages on a seperate server and have the requests sent to a worker process that processes the live Webpages. However, using the WebRequest and WebResponse, i can't seem to maintain an active session (I'm re-creating a new instace for each request). How would i go about retaining a session between multiple requests? OR, how can i use a single request object to make multiple consecutive request? Any examples or articles would be appreciated. Cheers Tris

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        If you are using HttpHandler, then you need to have IRequiresSessionState interface (marker interface) to be implemented. Then the automatic WebRequests would pass through.

        Vasudevan Deepak Kumar Personal Homepage Tech Gossips

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups