Hi have a form that call an Action properly. But when i enable the authentication forms, the action to login doesn't fire up (i test it with a breakpoint).
My Web.config is:
<authentication mode="Forms">
<forms loginUrl="Autenticacao/Index"></forms>
</au开发者_开发百科thentication>
<authorization>
<deny users="?"/>
</authorization>
It's in the view Index of controller Autenticacao where i have my form:
<% Html.BeginForm("Login", "Autenticacao"); %>
<input type="text" id="autenticacaoReferencia" name="autenticacaoReferencia" /><br />
<input type="text" id="autenticacaoPassword" name="autenticacaoPassword" /><br />
<input type="submit" value="Entrar" />
<% Html.EndForm(); %>
The controller Login is sucefully called just if the authentication form is disable.
Am i using the BeginForm in a wrong way?
Edit: The Login action:
public ActionResult Login(string autenticacaoReferencia, string autenticacaoPassword, string returnUrl)
{
...
}
Thanks
Are you decorating your actions with the [Authorize]
attribute?
精彩评论