我正在尝试将Core 1.0应用发布到2012R2框上,该框在IIS Express中可以在本地正常运行.
- 在服务器上安装了DotNetCore.1.0.0-WindowsHosting.exe
- 已安装httpPlatformHandler_amd64.msi
- 将应用程序池设置为无托管代码"
- 使用"Web Deploy"从VS发布
- 撰写本文时,最新的VS Core工具
我得到的是:
HTTP错误403.14-禁止
Web服务器配置为不列出此内容目录.
在
关于包括web.config的信息,请确保在您的 project.json 文件中包括以下代码.只需指定要包含在发布中的内容即可.
"publishOptions":{包括": ["wwwroot",视图","appsettings.json","web.config"]}I am trying to publish a Core 1.0 app to a 2012R2 box that runs fine locally in IIS Express.
- Installed DotNetCore.1.0.0-WindowsHosting.exe on server
- Installed httpPlatformHandler_amd64.msi
- Set app pool to have 'no managed code'
- published from VS using 'Web Deploy'
- Latest VS Core Tools as of this writing
All I get is:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
In this article from Microsoft it only mentions that a 403.14 Forbidden error is created by picking the wrong directory for the site... which is not the case.
VS does NOT pusblish the web.config, however. And there is no choice for 'copy to server always' or 'content' (in DDL), both choices are missing.
解决方案Make sure that the service account / user credentials set on the application pool has access to run / access the app. That was my issue when deploying to IIS a few times.
As for including the web.config, make sure to include the following code in your project.json file. Just specify what you want to include in the publish.
"publishOptions": { "include": [ "wwwroot", "Views", "appsettings.json", "web.config" ] }
更多推荐
.NET Core发布到IIS问题
发布评论