I’ve been working on a small console application (c#) for fetching a series of csv files. I have an URL and some POST data and I’m using the WebBrowser component due to javascript embedded in some of the pages. I’ve run into a little problem (been debugging for 2 days now) where the webbrowser control does not redirect as specified by one of the responses (302). See screen shot (request in red box, should redirect but doesn’t):

Since the last request being sent is a POST with a bunch of data created by javascript and it doesn’t seem to be possible to extract the post data from the webbrowser, I cannot intercept the request and just use HttpWebRequest instead. I have also tried looking at other web browser components such as GeckoFX and WebKit.net, but none seem to work.
I could really use some input here, since I’m pretty much stuck.
***Update: Added new image to point to request not redirecting correctly. Request nr. 8 (wrong scenario) is the same as request nr. 6 (right scenario)
Used the HttpWebRequest object instead, since it lets you disable automatical redirecting. Works perfectly.