Results 1 to 7 of 7

Thread: HTTP Headers

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2010
    Posts
    16

    HTTP Headers

    Hey,

    I hope you will be able to help, as I have spent 10 hours so far with no success. Let me explain the problem. I have created a few months ago a simple tool in vb.net, that sends an xml code to server, and that server sends response after a while. Everything is performed in http session, for that purpose I use webbrowser control and webclient. I know it could have been solved in different way, however iam not an expert in vb.net, and also didnt want to spend too much time on it. Anyway it worked, until they had changed something on the server. Let me explain in a few words how that tool works, so it will be easier to understand the problem.

    In the first part, I open an URL in the webbrowser control, subsequently I enter xml code in the textarea on that page and click on the submit button. In result of that I get another page with some data on it, namely links to xls files. In the next part I use webclient for downloading those files. What is important for all of these operations I need to use the same http session id.

    So, simply by now, i just set headers in webclient - WebClient.Headers.Add("Cookie", WebBrowser1.Document.Cookie.ToString) What have guaranteed to use the same session id by the WebClient. However, after the change made on the server mentioned before, the JSESSIONID value is not available in that string. When I use https analyzer (fiddler), I can see that value there...until moment when I am using WebClient. Of course due to that fact, the webclient won't download files for me, because the session id is not the same.

    There is one more thing, what would be useful. When I checked the cookies file on my harddrive, I saw that line starts like #HTTP_ONLY. I think that would cause that problem with jsessionid.

    Now, I am coming to my question Do you have any idea, how I would get that JSESSIONID value ? It is sent from webbrowser control, however don't know how to get it.

    Thanks in advance !!
    Last edited by patrickoq; Jun 12th, 2011 at 01:19 PM.

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