please your collaboration with the following: I have a controller with a couple of actions:
[Authorize]
public ActionResult conAut()
{
return View();
}
public ActionResult sinAut()
{
return View();
}
As you can see the difference between the two actions is that one has the [Authorize] and the other does not, in the web.config I have the following:
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<authentication mode="Forms">
<forms loginUrl="~/Credenciales/Login" timeout="2880" />
</authentication>
<pages>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
</namespaces>
</pages>
</system.web>
The problem is that when I start the project and I go directly to conAut, it does not redirect me to Login, it accesses conAut normally even though I do not log in, as far as I understand if in the web.config I have configured all the Actions that have the Authorize should re-address the Login when there is no authenticated user.