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 ...
随机推荐
- HBase随机读写
HDFS不太适合做大量的随机读应用,但HBASE却特别适合随机的读写 个人理解: 1.数据库一般都会有一层缓存,任何对数据的更改实际上是先更改内存中的数据.然后有异步的守护进程负责将脏页按照一定策略刷 ...
- JDK1.6新特性,WebService强化
Web service是一个平台独立的,松耦合的,自包含的.基于可编程的web的应用程序,可使用开放的XML标准来描述.发布.发现.协调和配置这些应用程序,用于开发分布式的互操作的应用程序. Web ...
- jmeter http协议---cookie处理
使用jmeter测试的http接口的时候,经常遇到需要cookie做免登录等作用的情况,jmeter如何在测试http接口的时候加载所需cookie呢?主要分两步 一. 收集对应站点的cookie 1 ...
- sql server中调用c#写的dll里的方法
最近有一项目: 一超市管理系统单机版,运行在WIN2003+SQL2005上,每天超市关门都都会关电脑,现客户要新加功能,每天关门下班后回家可以上网查看超市管理系统的数据库里的相关数据,然后再做一些原 ...
- HTML5学习笔记(三):语义化和新增结构元素
在HTML5之前,使用机器来阅读一个网页是非常困难的,我们使用不同样式的div来标记不同的内容,所以实际上机器无法得知页面的哪个部分是正文,哪个部分是标题,那么在HTML5里,针对这个问题就引入了语义 ...
- window函数 resetAccumulator
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreem ...
- shell(7):四则运算
shell 四则运算:expr,let,bc,(()), 1.expr的用法: expr命令是一个手工命令行计数器,用于在UNIX/LINUX下求表达式变量的值,一般用于整数值,也可用于字符串. 详细 ...
- Zend Studio 12 windows 无限期试用
安装: 1.下载最新版本Zend Studio:http://downloads.zend.com/studio-eclipse/12.0.0/ZendStudio-12.0.0-win32.win3 ...
- 将docker的image转移到数据盘
1. 将 /var/lib/docker 移至数据盘 原因: docker运行中产生较大文件,以及pull下来的images会占用很多空间: 注意:在执行前确认docker已经启动,sudo dock ...
- ZooKeeper示例 分布式锁
[转载请注明作者和原文链接, 如有谬误, 欢迎在评论中指正. ] 场景描述 在分布式应用, 往往存在多个进程提供同一服务. 这些进程有可能在相同的机器上, 也有可能分布在不同的机器上. 如果这些进程 ...