You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Marcelo Chryssovergis <ma...@iea.org.br> on 2006/11/01 13:29:35 UTC

Pass thru Login in a asp.net site

Hello people,

I´m trying to make the authentication in a asp.net site, but without success.

An Asp.Net site generates some hidden fields like:
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" /><input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" /><input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBAKstPOeBgL75ouGDgLznKRyAqOFwpwEtGJkEsfmFcRyE4LGeK8v6mZkNO0=" /><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2ODM2MDczMjlkZG1Ww1x8lZCXOXsQ0tkUR8hph/dO" />and the fields Login and Password:

<input name="ctl00$ContentInterna$txtEmail" type="text" id="ctl00_ContentInterna_txtEmail" class="text" />
<input name="ctl00$ContentInterna$txtSenha" type="password" id="ctl00_ContentInterna_txtSenha" class="text" style="width:122px;" />

I get the hidden fields dinamically and send with the login and password. But I aways get this error:

"Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that &lt;machineKey&gt; configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster."

Please, anyone can help in this one?

Thank you,

Marcelo

Re: Pass thru Login in a asp.net site

Posted by Roland Weber <ht...@dubioso.net>.
Hi Marcelo,

form submission is described in detail in our primer:
http://wiki.apache.org/jakarta-httpclient/ForAbsoluteBeginners

If you've ruled out everything you can think of, it is
time to get a sniffer program and compare the data that
is sent over the connection. If the site works with
Firefox/Seamonkey, start with the Live HTTP Headers plugin.
It is often the headers that make the difference.

hope that helps,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org