Publishing to IIS 发布到IIS
原文:https://docs.asp.net/en/latest/publishing/iis.html
发布到IIS
Publishing to IIS
By Rick Anderson and Luke Latham
Install the HTTP Platform Handler
Install the HTTP Platform Handler version 1.2 or higher:
If you need to enable IIS, see IIS server configuration.
Create Data Protection Registry Hive
To persist Data Protection keys you must create registry hives for each application pool to store the keys. You should use the Provisioning PowerShell script for each application pool you will be hosting ASP.NET 5 applications under.
For web farm scenarios developers can configure their applications to use a UNC path to store the data protection key ring. By default this does not encrypt the key ring. You can deploy an x509 certificate to each machine and use that to encrypt the keyring. See the configuration APIs for more details.
Publish from Visual Studio
- Create an ASP.NET 5 app. In this sample, I’ll create an MVC 6 app using the Web Site template under ASP.NET 5 Preview Templates.
- In Solution Explorer, right-click the project and select Publish.
- In the Publish Web dialog, on the Profile tab, select File System.
- Enter a profile name. Click Next.
- On the Connection tab, you can change the publishing target path from the default..\..\artifacts\bin\WebApp9\Release\Publish folder. Click Next.
- On the Settings tab, you can select the configuration, target DNX version, and publish options. Click Next.
The Preview tab shows you the publish path (by default, the same directory as the ”.sln” solution file).
Deploy to IIS server
- Navigate to the publish folder (..\..\artifacts\bin\WebApp9\Release\Publish folder in this sample).
- Copy the approot and wwwroot directories to the target IIS server. Note: MSDeploy is the recommended mechanism for deployment, but you can use Xcopy, Robocopy or another approach. For information on using Web Deploy see Publishing to IIS with Web Deploy using Visual Studio 2015.
- In IIS Manager, create a new web site and set the physical path to wwwroot. You can click onBrowse *.80(http) to see your deployed app in the browser. Note: The HTTP Platform Handler currently requires this work-around to support apps. If you get an HTTP error, see IIS server configuration.

IIS server configuration
- Enable the Web Server (IIS) server role. In client operating systems (Windows 7 through Windows 10) select Control Panel > Programs > Programs and Features > Turn Windows features on or off, and then select Internet Information Services.
- On the Role Services step, remove any items you don’t need. The defaults are shown below.
Unlock the configuration section.
- Launch IIS Manager and select the server in the Connections pane on the left (see image below).
- Double-click Configuration Editor.
- In the Section drop-down, select system.webServer/handlers, and then click Unlock Section.


- Set the application pool to No Managed Code. ASP.NET 5 runs in a separate process and manages the runtime.
Supported operating systems
The following operations systems are supported:
- Windows 7 and newer
- Windows 2008 R2 and newer
Common errors
The following is not a complete list of errors. Should you encounter an error not listed here, please leave a detailed error message in the DISQUS section below along with the reason for the error and how you fixed it.
HTTP 500.19 : ** This configuration section cannot be used at this path.**
- You haven’t enabled the proper roles. See IIS server configuration.
HTTP 500.19 : The requested page cannot be accessed because the related configuration data for the page is invalid.
- You haven’t installed the correct HTTP Platform Handler. See Install the HTTP Platform Handler
- The wwwroot folder doesn’t have the correct permissions. See IIS server configuration.
The IIS 7.0 CoreWebEngine and W3SVC features must be installed to use the Microsoft HTTP Platform Handler 1.x.
- Enable IIS; see IIS server configuration.
HTTP 502.3 Bad Gateway
- You haven’t installed the correct HTTP Platform Handler. See Install the HTTP Platform Handler
HTTP 500.21 Internal Server Error.
- No module installed. See IIS server configuration.
Additional Resources
Publishing to IIS 发布到IIS的更多相关文章
- [IIS]发布到 IIS 上的程序没有权限访问共享文件
老板突然跑路了,丢下一个破项目让我一个人维护,各种奇葩问题不断. 为了弄一键发布,布置了新的环境,结果新环境下的程序不能访问共享文件了. 访问共享文件需要设置应用程序池(Application Poo ...
- IIS发布 用户 \'IIS APPPOOL\\X\' 登录失败
曾多次遇到这个问题,我的解决方案就是修改数据库连接字符串 网上给的解决方案就是更换应用程序池的"进程模型":参考:http://jingyan.baidu.com/album/20 ...
- 本地MVC项目发布到IIS服务器
0瞎扯 朋友们有时候我们写个一个web程序只能使用卡西尼服务器调试,下面我教大家发布到IIS服务器上(包括本地ISS7.5和远程服务器 IIS) 1.VS发布 a.点击web项目->发布
- IIS 发布webservice 需要用户名和密码访问 解决
今天,我在IIS上发布了一个自己写的webservice,然后我在远程通过浏览器来访问这个webservice的时候出现一个登录界面如下 之前我朋友发布webservice的时候也出现过一次,那次好 ...
- 将asp.net core站点发布到IIS上遇到的问题
今天第一次将整个 asp.net core 站点发布到 IIS 上,以前都是发布到 Linux 服务器上. 开始使用 dotnet publish -c release 命令发布,用浏览器访问站点时出 ...
- IIS发布站点错误收集(持续更新)
本文主要收集IIS在发布站点过程中遇到的错误,并提供解决办法.并亲测可行.如果您也在使用IIS发布站点的过程中遇到了一些问题,欢迎留言提问. (1.) HTTP错误500.21-Internal Se ...
- IIS发布网站
IIS发布网站几个问题 1.部署步骤:http://jingyan.baidu.com/article/3065b3b6e5becdbecff8a4d5.html Win7下IIS报503Servic ...
- SlickUpload 发布到IIS后报错
开发时候采用slickupload控件都没问题,项目发布到IIS时发生了错误: Could not contact SlickUpload request progress handler at /S ...
- IIS发布WCF服务项目之本地
最近由于项目需求,要做一个上传文件附件的功能,由于是多用户访问,所以这就用到了WCF服务,程序编写完成就需要发布了, 下面记录下发布到IIS的过程: 1,安装IIS 第一步:检查Windows7中II ...
随机推荐
- elk 的报错和优化
参数调整 elasticsearch.yml配置文件里面,调整http.max_content_length: 500mb 这个默认就100m 建议调大 之前有过报错 #如果队列满了logstash就 ...
- pyqt5开发环境安装
1.下载所需软件. Anaconda下载地址:https://repo.continuum.io/archive/ PyQt5下载地址:https://sourceforge.net/projects ...
- 【硅谷问道】 WWDC 17: 开发者的最初观感
[硅谷问道] WWDC 17: 开发者的最初观感 前言 每年的 WWDC 都是 iOS 开发者集体高潮的时刻.第一天的 WWDC 带来了全新的 iOS 11.MacOS.tvOS 和 watchOS, ...
- Jackson 时间格式化,时间注解 @JsonFormat 用法、时差问题说明
https://www.sojson.com/blog/246.html ******************************************** Jackson 是 Spring ...
- XnView查看图片实际大小
找了很多软件,只有它可以显示尺寸大小. 各位如有别的发现,可留言推荐,谢谢
- MFC让进程利用所有处理器核心
参考资料: http://blog.csdn.net/baodi_z/article/details/1857820 http://blog.csdn.net/cbnotes/article/deta ...
- LeetCode: Reverse Nodes in k-Group 解题报告
Reverse Nodes in k-Group Given a linked list, reverse the nodes of a linked list k at a time and ret ...
- EXCEL行倒叙
- egret list不显示问题
1.循环滚动 2.单格滚动 不太清楚是把哪个约束勾上了,结果一直不显示,折腾了许久. 另外也不要把下面的这个约束勾上,否则不能滑动.
- cacti安装
cacti是一套基于PHP,MySQL,Net-SNMP及RRDTool开发的网络流量监测图形分析工具.它通snmpget来获取数据,使用RRDtool绘画图形,提供了非常强大的数据和用户管理功能,同 ...