I'm trying to login to a certain site using the HttpWebRequest, but right from the beginning of my code (in testing) I'm getting the following error:
Is there anyone that is familiar with this technique that can help me with this?
Code:
The remote server returned an error: (403) Forbidden.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The remote server returned an error: (403) Forbidden.
Source Error:
Line 38:
Line 39: Dim webRequest As HttpWebRequest = webRequest.Create(LOGIN_URL)
[COLOR=red]Line 40: Dim responseReader As StreamReader = New StreamReader(webRequest.GetResponse.GetResponseStream)[/color]
Line 41: Dim responseData As String = responseReader.ReadToEnd
Line 42: responseReader.Close()
Is there anyone that is familiar with this technique that can help me with this?