Недавно у меня возникла неприятная проблема, связанная с проверкой подлинности Windows для локального экземпляра IIS 7.5 (Windows 7 Pro) на сайт ASP.net 4.0. Я выполнил основные шаги.
Аутентификация IIS
- Отключить анонимную аутентификацию
- Включить проверку подлинности Windows
Изменить web.config
<authentication mode="Windows" />
Это помогло включить проверку подлинности Windows, но всякая попытка входа в систему была отклонена и в итоге вернула ошибку 401.1. Вот где и началась эта проблема. По-видимому, для этого есть много причин, которые хорошо документированы в Интернете, в том числе здесь, в Stack Overflow.
Я пробовал:
- Редактирование Аутентификация IIS "Дополнительные настройки" для проверки подлинности Windows для отключения проверки расширенной защиты и проверки в режиме ядра
- Редактирование IIS Authentication 'Providers' для перемещения NTLM выше Negotiate.
- Редактирование правил авторизации IIS.NET для объяснения Разрешить пользователям (и различные другие комбинации).
- Различные сценарии командной строки IIS и твики.
- Различные настройки настроек в файле web.config.
- Даже некоторые настройки прав доступа к файловой системе.
Но все безрезультатно, страшный 401.1 остался.
Это действительно случай "не видно дерева для деревьев". Ни одно из решений, которые мне удалось найти (назовите это случайными параметрами поиска, если хотите), работал у меня, поэтому я счел целесообразным опубликовать этот вопрос, надеюсь, дать четкий ответ, который легче найти для тех, кто страдает одной и той же проблемой.