Logging to remote asp.net Web Page
I wan't to connect to remote web page (that has login form) with HttpWebRequest. I am using this tutorial: http://www.byteblocks.com/page/How-to-submit-requests-to-web-sites-programatically-using-HttpWebRequest.aspx
,but I don't know where RequestAttributes class belongs to?!?
Is there any better way to do this? The remote page is in ASP.NET, it's using Form authentication and when someone makes a request to default.aspx it redirects it to login page. I want to parse default.aspx page, but before I am able to do that, I need to pass credentials to login form via POST method in开发者_Go百科 HttpWebRequest. Here is another example using POST method to pass parameters: http://www.worldofasp.net/tut/WebRequest/Working_with_HttpWebRequest_and_HttpWebResponse_in_ASPNET_114.aspx
but I don't understand why this does not work in ASP.NET remote page.
There is a great article about this problem and I've solved my problem with this. If someone has the same problem here it is:
http://dotnet.sys-con.com/node/45127
精彩评论