0

I added below code in my web config and

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

and while debugging in layout

@if (User.Identity.IsAuthenticated)

it is showing windows authentication and making it true., where I am doing wrong ?

  • Check this isn't in your web config , just remove it or comment it out. – Henry24 Jul 22 '16 at 20:38
  • I couldn't find any code you mentioned, but I added in other web config file. Now I am getting this error : "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS." – Gowthami Gattineni Jul 25 '16 at 14:08
  • Post your web config please – Henry24 Jul 25 '16 at 16:52
  • http://stackoverflow.com/questions/18746673/formsauthentication-mvc4 – Gowthami Gattineni Jul 26 '16 at 15:04

0 Answers0