Most typically your download page is a simple form which require HTTP request using the method "POST".
In this case, you have to use the class
System.Net.HttpWebRequest
. However, to create an instance of this class you need the class System.Net.WebRequest for its factory method
System.Net.FileWebRequest.Create
. Actual run-time type is defined by the URI.
Please see the code sample here:
http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[
^]. Don't forget: you need to set the
Method
property to "POST".
When authentication is successful you can proceed with file downloading or any other requests which needed authentication.
—SA