HttpWebRequest Sessionhandling

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark Chardonnens

    HttpWebRequest Sessionhandling

    Hi all,

    i use the HttpWebRequest an HttpWebResponse for reciving data from the asp
    site locahost/test.asp. If i do this for 10 times i will have 10 new session
    (IIS). How can i do this in only 1 session?

    httpRequest =
    (HttpWebRequest )WebRequest.Cre ate("http://localhost/test.asp");
    HttpWebResponse
    myHttpWebRespon se=(HttpWebResp onse)httpReques t.GetResponse() ;

    Thanx a lot!
    Mark Chardonnens


  • Morten Wennevik

    #2
    Re: HttpWebRequest Sessionhandling

    Call myHttpWebRespon se.Close(); ?

    --
    Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

    Comment

    • Mark Chardonnens

      #3
      Re: HttpWebRequest Sessionhandling

      no...
      but i try it....
      doesnt work...... still a new session....


      "Morten Wennevik" <MortenWennevik @hotmail.com> wrote in message
      news:oprxsvp3t8 hntkfz@localhos t...[color=blue]
      > Call myHttpWebRespon se.Close(); ?
      >
      > --
      > Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/[/color]


      Comment

      • Morten Wennevik

        #4
        Re: HttpWebRequest Sessionhandling

        Well yeah, you'll get a new session, but it should close the last one, so
        you shouldn't have 10 simultanous sessions.

        --
        Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

        Comment

        • Mark Chardonnens

          #5
          Re: HttpWebRequest Sessionhandling

          hmm... whats about session-variables? if i connect the first time on my
          site, i have to post some login data. With my second call i'm allowed to get
          some data.... if i get there a new session, so i'm not logged in right? how
          can do that?

          tnx a lot!


          "Morten Wennevik" <MortenWennevik @hotmail.com> wrote in message
          news:oprxs0irk4 hntkfz@localhos t...
          Well yeah, you'll get a new session, but it should close the last one, so
          you shouldn't have 10 simultanous sessions.

          --
          Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/


          Comment

          • Morten Wennevik

            #6
            Re: HttpWebRequest Sessionhandling

            Um, I'm not entirely sure what you are trying to do, but if you need to
            store data between sessions you can use application variables or
            databases, on the server side.

            However, if you don't control the server side, ..., not sure. I've used
            webrequest/response pretty much only to request a single page or file.
            Sorry

            --
            Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

            Comment

            • Mark Chardonnens

              #7
              Re: HttpWebRequest Sessionhandling

              okey... it works now...

              i didnt know that i have to get the cookie and send it back to the server
              for next call!
              thanks a lot!


              "Morten Wennevik" <MortenWennevik @hotmail.com> wrote in message
              news:oprxs3rbii hntkfz@localhos t...
              Um, I'm not entirely sure what you are trying to do, but if you need to
              store data between sessions you can use application variables or
              databases, on the server side.

              However, if you don't control the server side, ..., not sure. I've used
              webrequest/response pretty much only to request a single page or file.
              Sorry

              --
              Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/


              Comment

              Working...