VS2013 Update3, .Net 4.5, MVC, IIS 7
Я создал новый проект mvc. Проверено от VS, и это работает. Из ИИ я создал папку в wwwroot и сделал ее приложением. Добавьте пул приложений с .net 4.0. Включена проверка подлинности Windows и отключена анонимная проверка подлинности. Установите учетную запись службы в пуле приложений и веб-приложении. Из VS я развертываю в IIS с настройками по умолчанию (которые НЕ предварительно компилируются) (используя файловую систему). Сайт отлично работает в IIS. Но… Если развернуть с нажатой настройкой прекомпиляции. Веб-сайт не работает с ошибкой 403. Пробовал различные комбинации и никогда не получал предварительно скомпилированную работу. Всегда работает, если не предварительно скомпилирован.
ASP.NET 4 был зарегистрирован в IIS. Пробные модули runAllManagedModulesForAllRequests="true" не увенчались успехом.
У меня закончились идеи, и я ищу помощи
Server Error in Application "xxx/MVCHELLOWORLD"
Internet Information Services 7.5
Error Summary
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
Detailed Error Information
Module
DirectoryListingModule
Notification
ExecuteRequestHandler
Handler
StaticFile
Error Code
0x00000000
Requested URL
http://xxx/MvcHelloWorld/
Physical Path
C:\inetpub\wwwroot\MvcHelloWorld\
Logon Method
Negotiate
Most likely causes: •A default document is not configured for the requested URL, and directory browsing is not enabled on the server.
Things you can try: •If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
• Enable directory browsing using IIS Manager. 1.Open IIS Manager.
2.In the Features view, double-click Directory Browsing.
3.On the Directory Browsing page, in the Actions pane, click Enable.
•Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.
Links and More InformationThis error occurs when a document is not specified in the URL, no default document is specified for the Web site or application, and directory listing is not enabled for the Web site or application. This setting may be disabled on purpose to secure the contents of the server.
View more information »