I wrote this in web.config:
<authentication mode="Forms">
<forms loginUrl="~/en/Account/LogIn" timeout="2880" />
</authentication>
and this in an action in the controller:
[Authorize]
public ActionResult AccountInfo()
{
return view()
}
now, when I run the program – and try to get to the account-info view -it doesn’t bring me there, what very fine. But when I logged in and try to get to this view – it also doesn’t let me the view, what very bad…
I did the authentication thing just because I wanted to let only logged in users to have an access to my site, not to prevent them as well.
How do I give them the access?
thank in advance.
solved
I needed to write the url in this place and like this:
<location path="~/en/Account/LogIn">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
instead of <authentication> <form> , write it in <location>
I needed to write the url in this place and like this:
instead of
<authentication> <form>, write it in<location>