0
Hello,
I am trying to login to the site and I get the error message: Exception has been thrown by the target of an Invocation
Dim url As String = "https://www.academia.edu/login"
Dim client As New WebClient()
Dim method As String = "POST"
Dim parameters As New NameValueCollection()
parameters.Add("login", "mylogin")
parameters.Add("password", "mypass")
Dim response_data As Byte() = client.UploadValues(url, method, parameters)
Dim responseString As String = UnicodeEncoding.UTF8.GetString(response_data)
Error: Exception has been thrown by the target of an Invocation
the message is clear, it means that the service that called triggered an error. You need to put this in a Try catch block to get the description of the error, but you can start by analyzing if the call is ok. Is it a POST? The parameter names are correct?
– Ricardo Pontual
Hello Ricardo, All right? What I’m trying to do is log in to the site. Maybe the script is not correct . If you can help thank.
– HernaniGarcia