Hi all,
I have a problem with with configuration of Windows Authentication in my app.
I have local IIS in which I configured to allow Windows Authentication and deny anonymous Authentication in application.config:
<location path="xxx">
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="false" />
<windowsAuthentication enabled="true" />
</authentication>
</security>
</system.webServer>
</location>
I also set it in web.config:
<system.web>
<authentication mode="Windows" >
</authentication>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<authorization>
<allow users="*" />
<deny users="?"/>
</authorization>
</system.web>
<system.webServer>
<security>
<authentication>
<anonymousAuthentication enabled="false" />
<windowsAuthentication enabled="true" />
</authentication>
</security>
When I enter my Home site in IIS Logs I'm getting 3 entries f.e.:
2016-05-18 15:49:16 ::1 GET /XXX/ - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/50.0.2661.102+Safari/537.36 - 401 2 5 44
2016-05-18 15:49:21 ::1 GET /XXX/ - 80 DESKTOP-DKCBHRC\Nexio+Managment ::1 Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/50.0.2661.102+Safari/537.36 - 200 0 0 5825
2016-05-18 15:49:21 ::1 GET /XXX/__browserLink/requestData/20752c385bd1441083e3e26a9fb8f6af version=2 80 DESKTOP-DKCBHRC\Nexio+Managment ::1 Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/50.0.2661.102+Safari/537.36 http://localhost/WMSAdminTool/
200 0 0 13
I need to avoid the first entry where there is anonymus request and it gives back 401 error. The application opens correctly, because the second request uses Windows Authentication. I read one document which says that this is how IIS works with Windows Authentication. Can anyone know a way to avoid this first error entry?