Send cookie with request

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

    Send cookie with request

    I need to send a cookie with a web service call.
    I create a cookie and a container, associate it with the web service call.

    But when I check with the network monitor, there is no cookie in the http
    stream attached.
    What could be the problem?

    PS: I don't need session

    Thanks
    Eric

    Dim si As New CLServiceIdenti fication
    'Add Cookie
    si.CookieContai ner = pMPIData.GetSSO CookieContainer ()

    ' Call WS
    _wsResult = si.identifyClie nt(.....)



  • [MSFT]

    #2
    RE: Send cookie with request

    Hello Eric,

    Have you check the Count property of CookieContainer ? Maybe there is no
    cookie in it yet. Also I suggest you may test sample in this article:



    to see if you can get the cookie in the http stream. (Surely we don't need
    session, but for a simple test, session can help us create a cookie)

    Luke

    Comment

    • Eric

      #3
      Re: Send cookie with request

      Thanks for answering.

      I think it has something to do with the domain property in the cookie.

      If the domain isn't the same like the destination url, the cookie isn't
      sent.

      PS: I try to resend a cookie which i received from the server but nit in the
      same session.
      For that I reconstruct the cookie from scratch.

      Eric


      "[MSFT]" <lukezhan@onlin e.microsoft.com > wrote in message
      news:okvGAjOXFH A.388@TK2MSFTNG XA01.phx.gbl...[color=blue]
      > Hello Eric,
      >
      > Have you check the Count property of CookieContainer ? Maybe there is no
      > cookie in it yet. Also I suggest you may test sample in this article:
      >
      > http://support.microsoft.com/default...;EN-US;Q820528
      >
      > to see if you can get the cookie in the http stream. (Surely we don't need
      > session, but for a simple test, session can help us create a cookie)
      >
      > Luke[/color]


      Comment

      Working...