原文:https://docs.asp.net/en/latest/publishing/iis.html

发布到IIS

Publishing to IIS

By Rick Anderson and Luke Latham

Install the HTTP Platform Handler

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

  1. 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.
  2. In Solution Explorer, right-click the project and select Publish.

  1. In the Publish Web dialog, on the Profile tab, select File System.

  1. Enter a profile name. Click Next.
  2. On the Connection tab, you can change the publishing target path from the default..\..\artifacts\bin\WebApp9\Release\Publish folder. Click Next.
  3. 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

  1. Navigate to the publish folder (..\..\artifacts\bin\WebApp9\Release\Publish folder in this sample).
  2. 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.
  3. 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

  1. 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.

  1. On the Role Services step, remove any items you don’t need. The defaults are shown below.

  1. 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.**

  • HTTP 500.19 : The requested page cannot be accessed because the related configuration data for the page is invalid.

  • The IIS 7.0 CoreWebEngine and W3SVC features must be installed to use the Microsoft HTTP Platform Handler 1.x.

  • HTTP 502.3 Bad Gateway

  • HTTP 500.21 Internal Server Error.

Publishing to IIS 发布到IIS的更多相关文章

  1. [IIS]发布到 IIS 上的程序没有权限访问共享文件

    老板突然跑路了,丢下一个破项目让我一个人维护,各种奇葩问题不断. 为了弄一键发布,布置了新的环境,结果新环境下的程序不能访问共享文件了. 访问共享文件需要设置应用程序池(Application Poo ...

  2. IIS发布 用户 \'IIS APPPOOL\\X\' 登录失败

    曾多次遇到这个问题,我的解决方案就是修改数据库连接字符串 网上给的解决方案就是更换应用程序池的"进程模型":参考:http://jingyan.baidu.com/album/20 ...

  3. 本地MVC项目发布到IIS服务器

    0瞎扯 朋友们有时候我们写个一个web程序只能使用卡西尼服务器调试,下面我教大家发布到IIS服务器上(包括本地ISS7.5和远程服务器 IIS) 1.VS发布 a.点击web项目->发布

  4. IIS 发布webservice 需要用户名和密码访问 解决

    今天,我在IIS上发布了一个自己写的webservice,然后我在远程通过浏览器来访问这个webservice的时候出现一个登录界面如下  之前我朋友发布webservice的时候也出现过一次,那次好 ...

  5. 将asp.net core站点发布到IIS上遇到的问题

    今天第一次将整个 asp.net core 站点发布到 IIS 上,以前都是发布到 Linux 服务器上. 开始使用 dotnet publish -c release 命令发布,用浏览器访问站点时出 ...

  6. IIS发布站点错误收集(持续更新)

    本文主要收集IIS在发布站点过程中遇到的错误,并提供解决办法.并亲测可行.如果您也在使用IIS发布站点的过程中遇到了一些问题,欢迎留言提问. (1.) HTTP错误500.21-Internal Se ...

  7. IIS发布网站

    IIS发布网站几个问题 1.部署步骤:http://jingyan.baidu.com/article/3065b3b6e5becdbecff8a4d5.html Win7下IIS报503Servic ...

  8. SlickUpload 发布到IIS后报错

    开发时候采用slickupload控件都没问题,项目发布到IIS时发生了错误: Could not contact SlickUpload request progress handler at /S ...

  9. IIS发布WCF服务项目之本地

    最近由于项目需求,要做一个上传文件附件的功能,由于是多用户访问,所以这就用到了WCF服务,程序编写完成就需要发布了, 下面记录下发布到IIS的过程: 1,安装IIS 第一步:检查Windows7中II ...

随机推荐

  1. windows 环境使用 kafka

    近来学习 kafka,网上搜的教程好多不好用.在此开一贴记录一下学习过程.推荐官网,是最好的教程 http://kafka.apache.org/quickstart 官网上是linux 环境,我用的 ...

  2. django 模板语言入门详解

    django 模板语言所解决的问题域: 1.动态生成html文件 2.是上这个模板语言用可用于生成任何形式的文本文件 从一个不用模板语言生成html的例子看模板语言的优点: 假设我要生成一个 “hel ...

  3. 【OfficeWebViewer】在线预览Word,Excel~

    今天有个需求, 直接支持web端预览word,excel等文件, 查了一下很多写的比较麻烦, 这里找到一种简单的方式: http://view.officeapps.live.com/op/view. ...

  4. android开发前奏曲之开发工具ADT

    原文:http://android.eoe.cn/topic/android_sdk Android开发工具(ADT)插件为Eclipse提供了一个专业级的开发环境,用于构建Android应用程序.这 ...

  5. 【Unity】11.5 物理材质 (Physics Material)

    分类:Unity.C#.VS2015 创建日期:2016-05-02 一.简介 物理材质 (Physics Material) 用于调整碰撞对象的摩擦力和反弹效果. 二.创建物理材质 要创建物理材质 ...

  6. LeetCode——4Sum & 总结

    LeetCode--4Sum & 总结 前言 有人对 Leetcode 上 2Sum,3Sum,4Sum,K Sum问题作了总结: http://blog.csdn.net/nanjunxia ...

  7. Linux/CentOS关闭图形界面(X-window)和启用图形界面命令

    1.在图像界面关闭x window:1.1 shell中运行 init 3  进入文本模式,同时会关闭相关的服务(Xserver 肯定关闭)1.2 Alt+Ctrl+F1~F6到字符界面,root登陆 ...

  8. Java套接字Socket编程--TCP参数

    在Java的Socket中,主要包含了以下可设置的TCP参数. 属性 说明 默认值 SO_TIMEOUT 对ServerSocket来说表示等待连接的最长空等待时间; 对Socket来说表示读数据最长 ...

  9. Cisco交换机堆叠与HSRP之间的区别

    随着Internet的日益普及,人们对网络的依赖性也越来越强.这同时对网络的稳定性提出了更高的要求,人们自然想到了基于设备的备份结构,就像在服务器中为提高数据的安全性而采用双硬盘结构一样.核心交换机是 ...

  10. RAID卡的缓存与磁盘自带的缓存的关系

    RAID卡是否有(启用)缓存对“随机读写”性能有巨大的影响.中高端的RAID卡都有缓存(价格也高). 那么RAID卡的缓存与磁盘自带的缓存是如何设置的? 戴尔服务器的perc H710 RAID卡有5 ...