且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

vb.net和asp新手

更新时间:2023-01-17 10:51:43

要在您自己的网站上进行身份验证,请从这里开始: http://msdn.microsoft.com/en-us/library/eeyk640h%28v=vs。 100%29.aspx [ ^ ]。



此代码项目文章也可能有用: ASP.NET身份验证和授权 [ ^ ]。



用户通过身份验证后,需要访问其他一些网站并对其进行身份验证。这取决于该网站的要求(请参阅我对该问题的评论)。无论如何,如果你使用类 System.Net.HttpWebRequest ,你可以模拟任何用户的动作:

http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx [ ^ ]。



最有可能的是,该网站有一些登录表格。如果您了解此表单(例如,使用浏览器的查看页面源),您可以了解所需的内容。在表单上,​​HTTP请求由具有name属性的控件组成。但是一般问题接近于网络抓取的问题:

http: //en.wikipedia.org/wiki/Web_scraping [ ^ ]。



请查看我过去的答案:

从网页获取特定数据 [ ^ ],

如何从其他网站获取数据 [ ^ ]。



-SA
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