Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FormsAuthentication LoginUrl [duplicate]

I am at a total loss here. This was working earlier. I have an MVC3 app using forms authentication. In web config, I have the following:

<authentication mode="Forms">
  <forms loginUrl="~/Login/Index" timeout="2880"/>
</authentication>

Yet, for some reason, when redirecting, or when checking FormsAuthentication.LoginUrl, its still using the default /Account/Login. Which doesn't exists. Why isnt the web.config overriding this?

like image 829
Kyeotic Avatar asked Jun 22 '11 23:06

Kyeotic


1 Answers

Try adding this to appSettings in your web.config:

<add key="loginUrl" value="~/Account/LogOn" />
like image 62
frennky Avatar answered Oct 07 '22 01:10

frennky