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. Send Cookie in HTTP Header Request

Send Cookie in HTTP Header Request

Scheduled Pinned Locked Moved ASP.NET
xmlhelpquestionloungelearning
2 Posts 1 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.
  • I Offline
    I Offline
    il_manti
    wrote on last edited by
    #1

    Hi all, At work we are using a third party web service. The web service works in two tiers. First you request general information. The XML returned contains various IDs. It also contains a JSESSIONID field. In the second phase, another method in the web service requests one of the IDs returned. Now, here's the problem. If we just give the web service the ID requested in the parameter, it asks for the JSESSIONID value. We dug some more and found out we need to pass this JSESSIONID value as a Cookie in the Header section. The actual instruction was: Also the 'jsessionid' given in the preliminary response has to be handed over in the HTTP-Header 'cookie'. Multiple requests can be performed in one session. So I created a CookieContainer and appended it to the HTTPWebRequest object I'm passing to the webservice (thanks google) but to no avail! What can there be wrong? We're at a total loss here...

    In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)

    I 1 Reply Last reply
    0
    • I il_manti

      Hi all, At work we are using a third party web service. The web service works in two tiers. First you request general information. The XML returned contains various IDs. It also contains a JSESSIONID field. In the second phase, another method in the web service requests one of the IDs returned. Now, here's the problem. If we just give the web service the ID requested in the parameter, it asks for the JSESSIONID value. We dug some more and found out we need to pass this JSESSIONID value as a Cookie in the Header section. The actual instruction was: Also the 'jsessionid' given in the preliminary response has to be handed over in the HTTP-Header 'cookie'. Multiple requests can be performed in one session. So I created a CookieContainer and appended it to the HTTPWebRequest object I'm passing to the webservice (thanks google) but to no avail! What can there be wrong? We're at a total loss here...

      In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)

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

      SOLVED. If anyone else has this problem just visit this link.

      In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)

      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