web page retrieval

G

Guest

To view my bank accounts online, I go to my bank's website and login with username and password. How do I do retrieve the same web page programmatically, say using WebClient or similar? I don't know how to send along the encrypted username/password with the URL, obviously my IE browser does.
Thanks,
Gary
 
M

Morten Wennevik

Hi Gary,

I don't think you can use a WebClient if you need to pass information in the request (like user name and password). The HttpWebRequest/HttpWebResponse should manage that. I couldn't tell you how, and I suspect you need to deal with ssl at some point.
 
G

Guest

Hey Gary,

As Morten says, you are better off using HttpWebRequest. My bet is that your online bank uses HTTP POST to send the username/password to the server and they are probably using SSL. HttpWebRequest has no problems using SSL - all you have do to is specify https when you create an HttpWebRequest object. HttpWebRequest objects are created using WebRequest.Create.

In order to post username/password to the bank's server, you need to find out the IDs of the input boxes in which you enter the username and password. These IDs identify the names of the post data. To send post data you need to call HttpWebRequest.GetRequestStream. The method returns a stream that you can use to send username and password as post data (<a href="http://msdn.microsoft.com/library/d...thttpwebrequestclassgetrequeststreamtopic.asp">http://msdn.microsoft.com/library/d...thttpwebrequestclassgetrequeststreamtopic.asp</a>.

I hope this will get you started :)

Regards, Jakob.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top