!! Need Help In Login Using HttpWebrequest !!

Youtube-Toys

Regular Member
Jr. VIP
Joined
Sep 28, 2012
Messages
233
Reaction score
173
Hello Coding Masters,

I am trying to login into google using HttpWebrequest but still not got success..

usally i do programming using web browser but they are only single threaded and slow..that's why i decided to code a bot using Httpwebreuest.

I am struggling with httpwebrequest from 10 days i searchde much more and also learned on howtostartprogramming

but i cannot able to login into google..

i foolow everything using fiddler2 and livehttpheaders..

but no success..

i also maintain cookies for all sessions using main cookie container as specified on howtostartprogramming..

can somebody help me here..

i just need to know how i can login is there any working example?

Thans in advance
 
Programming with the WebBrowser does suck...

I couldn't find any up-to-date examples online but I do it with 3 requests.
First, use Fiddler to decode and view the https (have to setup a certificate to read the https; fiddler has help on doing this) response headers. You need to mimic these.

Step 1 - Request the login page.
Make sure to parse all the login variables in the login form.
Some of these variables change so it's important to refresh each time you login. Don't try using the same variables Fiddler is sending when you manually login.

Step 2 - Submit the form
If done correctly, you should be returned with 6 cookies if I recall right. Store these in your Cookie Container.

Step 3 - Request Google's homepage w/your new cookie container.
You should find your username in the html that indicates you are successfully logged in.

After Step 3, navigate as normal using your Cookie Container. You will be logged in as long as you keep using you the same cookie container.

If your new to programming it may take a little tinkering but it's not difficult once you get Fiddler to decode the HTTPS requests.
 
Programming with the WebBrowser does suck...

I couldn't find any up-to-date examples online but I do it with 3 requests.
First, use Fiddler to decode and view the https (have to setup a certificate to read the https; fiddler has help on doing this) response headers. You need to mimic these.

Step 1 - Request the login page.
Make sure to parse all the login variables in the login form.
Some of these variables change so it's important to refresh each time you login. Don't try using the same variables Fiddler is sending when you manually login.

Step 2 - Submit the form
If done correctly, you should be returned with 6 cookies if I recall right. Store these in your Cookie Container.

Step 3 - Request Google's homepage w/your new cookie container.
You should find your username in the html that indicates you are successfully logged in.

After Step 3, navigate as normal using your Cookie Container. You will be logged in as long as you keep using you the same cookie container.

If your new to programming it may take a little tinkering but it's not difficult once you get Fiddler to decode the HTTPS requests.

Thanks A Lot for Detailed Instructons
 
Back
Top