Click here to Skip to main content
15,908,675 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to use vb.net code to access a web page and pass a login and password to get to the next page. Then i can activate the FTP loader. My question is how would I write this first step to get into the site. I really dont know much .net and need to make this the first step.
Posted
Comments
Sergey Alexandrovich Kryukov 7-Oct-13 11:41am    
It all depends on requirements imposed by the other Web site. For the authentication part on your site, read about ASP.NET authentication.
—SA

1 solution

For authentication on your own site, please start here: http://msdn.microsoft.com/en-us/library/eeyk640h%28v=vs.100%29.aspx[^].

This Code Project article could also be useful: ASP.NET authentication and authorization[^].

And after the user is authenticated, you would need to access some other site and authenticate on it. It depends on what this site requires (please see my comment to the question). Anyway, you can simulate any user's action if you use the class System.Net.HttpWebRequest:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^].

Most likely, that site has some log-on form. You can learn what's required if you learn this form (say, using your browser's "View page source"). On a form, HTTP request is composed of controls with the "name" attributes. But the general problem is close to the problem of Web scraping:
http://en.wikipedia.org/wiki/Web_scraping[^].

Please see my past answers:
get specific data from web page[^],
How to get the data from another site[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900