0

I created a new area "admin", add following code to web.config in the admin area.

<authentication mode="Forms">
  <forms loginUrl="~/admin/login" timeout="2880" />
</authentication>

if I go to admin page without logging in, I still get redirected to ~/account/login page. seems like the web.config in admin area didnt overwrite the web.config file in the root folder. not sure whats wrong, please help me out.

qinking126
  • 11,385
  • 25
  • 74
  • 124

1 Answers1

1

web.config in area folder can not specify runtime behavior. Its only function is to define some options pertaining to view compilation.

Sergei Rogovtcev
  • 5,804
  • 2
  • 22
  • 35
  • So this is completely different than in web forms where you could add appSettings and such and access them within subfolders. Adding app settings within area and trying to access from a controller wouldn't work then? – DFTR Oct 13 '15 at 19:44