1
votes

How to setup windows authentication on IIS.

I have added following lines in appkeys in web.config:

   <add key="autoFormsAuthentication" value="false" />
   <add key="enableSimpleMembership" value="false" />


 <authentication mode="Windows">
</authentication>

<authorization>
   <deny users="?/>
</authorization>

above all working fine on development environment. But, when hosted on IIS and also set windows authention mode enable in IIS.

Then, its just gicing me errir 401 nOT AUTHORIZE ERROR.

If I remove deny user then, not able to get Http context user name and application not working.

1

1 Answers

0
votes

I got the solution.

I just needed to disable anonomous authenticaiton in IIS. In addition to above all settings.

So, IIS - enable windows authentcaiton and disable anonomous authentication and apply settings that mentioned in above question.

Thanks