1

First of all I am not doing any kind of hacking, because I am using my valid credentials to access the site. I am creating an application to access that site from my windows application.

but I am not sure how to create a request for it. here is a request header which I got from chrome deveoper tool when I access the login page of the site.

enter image description here

than, to login I enter my credentials and it redirect it to my home page, the request header for it is here: enter image description here

Any Idea how I do this via code? I am updating this question..that I know I can do this by HttpWebRequest..but I dnt know how to set that Cookie part.

Thanks

BreakHead
  • 10,480
  • 36
  • 112
  • 165
  • Visual Studio Team System 2008 Team Suite has the ability to record web requests to make performance/load tests from them. If you are not familiar with all these requests, you could use recordings to write code on your own then. – Iarek Nov 04 '11 at 13:44

2 Answers2

3

Use an HttpWebRequest and POST whatever data you need to it.

derek
  • 4,826
  • 1
  • 23
  • 26
1

What derek said plus...

Last time I did this I used the HTML agility pack to parse out the __VIEWSTATE and all the other __XXX variables which will need to be posted. One will also have to remember to POST the the session cookie and any authorization cookies you get back.

MatthewMartin
  • 32,326
  • 33
  • 105
  • 164