There is a site with this form for login :
<form action="****" method="post">
<input name="token" type="hidden" value="QgS9Rs/nBnba" />
<div class="userName">
<strong>User name</strong>:<br />
<input type="text" name="UserHandle" id="nameOrEmail" />
</div>
<div class="password">
<strong>Password</strong>:<br />
<input type="password" name="Password" />
</div>
<div>
<input id="login" type="submit" value="SignIn" name="Login" />
</div>
</form>
When i copy this section of page in a .html file on my computer,then open it by some browser, then i input username and password , i can login to site properly. But i need to login to the site with C#, so i implement this code :
WebClient wc = new WebClient();
byte[] resp = wc.UploadValues("***", new System.Collections.Specialized.NameValueCollection
{
{"token",tokenVal},
{"UserHandle","my username"},
{"Password","my password"},
{"Login","SignIn"}
});
string _response = Encoding.ASCII.GetString(resp);
The tokenVal has valid data and i trust it. Any idea?