1.安装 .NET Core Framework

下载.net core地址:官网地址

2.Install IIS

在控制面板->程序与功能-》Internet Infomation Services

3.站点部署

  实例: https://github.com/aspnet/mvc

  在IIS管理器,新建站点->物理路径Path:为项目的根目录。

 网站绑定:

  在host文件中添加127.0.0.1 mvcsanbox.cn,刷新dns缓存:cmd->ipconfig /flushdns

  设置主机域名为:mvcsanbox.cn 端口:80

4.安装 .net Core Windows Server Hosting

下载地址: .NET Core Windows Server Hosting

5.设置网站的web.config

<?xml version="1.0"?>
<configuration><system.webServer><directoryBrowse enabled="true"/><handlers><add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/></handlers><!--<aspNetCore processPath="C:\Program Files\dotnet\dotnet.exe" arguments=".\AspNetCoreSampleForNano.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />--><aspNetCore processPath=".\bin\Debug\net451\win7-x64\MvcSandbox.exe" arguments=""   stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />
</system.webServer>
</configuration>

参数说明:

Attribute Description
processPath

Required string attribute.

Path to the executable that will launch a process listening for HTTP requests. Relative paths are supported. If the path begins with '.', the path is considered to be relative to the site root.

There is no default value.

arguments

Optional string attribute.

Arguments to the executable specified in processPath.

The default value is an empty string.

startupTimeLimit

Optional integer attribute.

Duration in seconds that the module will wait for the executable to start a process listening on the port. If this time limit is exceeded, the module will kill the process. The module will attempt to launch the process again when it receives a new request and will continue to attempt to restart the process on subsequent incoming requests unless the application fails to start rapidFailsPerMinute number of times in the last rolling minute.

The default value is 120.

shutdownTimeLimit

Optional integer attribute.

Duration in seconds for which the module will wait for the executable to gracefully shutdown when theapp_offline.htm file is detected.

The default value is 10.

rapidFailsPerMinute

Optional integer attribute.

Specifies the number of times the process specified in processPath is allowed to crash per minute. If this limit is exceeded, the module will stop launching the process for the remainder of the minute.

The default value is 10.

requestTimeout

Optional timespan attribute.

Specifies the duration for which the ASP.NET Core Module will wait for a response from the process listening on %ASPNETCORE_PORT%.

The default value is "00:02:00".

stdoutLogEnabled

Optional Boolean attribute.

If true, stdout and stderr for the process specified in processPath will be redirected to the file specified in stdoutLogFile.

The default value is false.

stdoutLogFile

Optional string attribute.

Specifies the relative or absolute file path for which stdout and stderr from the process specified inprocessPath will be logged. Relative paths are relative to the root of the site. Any path starting with '.' will be relative to the site root and all other paths will be treated as absolute paths. A timestamp and the file extension will automatically be added to the filename provided. Any folders provided in the path must exist in order for the module to create the log file.

The default value is aspnetcore-stdout.

forwardWindowsAuthToken true or false.

If true, the token will be forwarded to the child process listening on %ASPNETCORE_PORT% as a header 'MS-ASPNETCORE-WINAUTHTOKEN' per request. It is the responsibility of that process to call CloseHandle on this token per request.

The default value is false.

disableStartUpErrorPage true or false.

If true, the 502.5 - Process Failure page will be suppressed, and the 502 status code page configured in your web.config will take precedence.+

The default value is false.

参考地址:

https://docs.microsoft.com/en-us/aspnet/core/publishing/iis#common-errors

https://docs.microsoft.com/en-us/aspnet/core/publishing/iis#iis-configuration

https://docs.microsoft.com/en-us/aspnet/core/hosting/aspnet-core-module

转载于:https://www.cnblogs.com/CrazyAnts/p/6322723.html

【先定一个小目标】Asp.net Core 在IIS上的托管运行相关推荐

  1. 先定一个小目标,自己封装个ajax

    你是否发现项目中有很多页面只用到了框架不到十分之一的内容,还引了压缩后还有70多kb的jquery库 你是否发现项目中就用了两三个underscore提供的方法,其他大部分的你方法你甚至从来没有看过 ...

  2. Java学习|先定一个小目标比如让行为聚焦

    2019独角兽企业重金招聘Python工程师标准>>> 版权声明:本文为北京尚学堂原创文章,未经允许不得转载.​ 如果你想达成一个结果,而且保持效率和质量,就必须让自己行为聚焦到一点 ...

  3. 【科技百咖】人大金仓:先定一个小目标,比如做中国No.1的数据库

    自身的强大内力才是制胜一切的关键 自中美贸易摩擦开始,国内就悄然兴起了一股「王牌热」,大家纷纷在各个角度寻找中国制胜美国的各种「王牌」.但在人大金仓总裁杜胜的心中,真正的王牌还是「内力」,自身的强大内 ...

  4. 【先定一个小目标】数据挖掘学习进度总结

    1 数据可视化 pandas df.head() 看前几行 df.value_counts() 看总体分布 df.info()/df.describe() 看缺失值.整体情况 df.plot(kind ...

  5. 关于“先定一个小目标,比如挣它一个亿”

    王健林有一次在采访里说过这句话"先定一个小目标,比如挣它一个亿" 这句话的确挺有意思,起初我只是把它当作段子来看的. 最近在学习python,我发现学习的这个过程,也需要有明确的目 ...

  6. 先定一个小目标:10天自学C语言编程,教你如何改变一生

    C语言是面向过程的,而C++是面向对象的 C和C++的区别: C是一个结构化语言,它的重点在于算法和数据结构.C程序的设计首要考虑的是如何通过一个过程,对输入(或环境条件)进行运算处理得到输出(或实现 ...

  7. 吴云坤:先定一个小目标,让网络安全具有智能

    前言 忽如一夜春风来!本周有一个王健林的采访视频刷爆了朋友圈,无独有偶,他谈小目标的话音还未落,同一天360网神集团总裁吴云坤,也定了一个小目标,一个能达到的小目标:"让网络安全具有智能&q ...

  8. 2019,先定个小目标

    说来惭愧自己一直没有写文章定目标这些一类的习惯,只是偶尔会想起应该办这件事了自己就会去做,然而坚持不了多久就放弃了.别人问我我的目标是什么或者我想要什么的时候,我也一概不知道,不知道自己到底在追求什么 ...

  9. 写一个简版 asp.net core

    动手写一个简版 asp.net core Intro 之前看到过蒋金楠老师的一篇 200 行代码带你了解 asp.net core 框架,最近参考蒋老师和 Edison 的文章和代码,结合自己对 as ...

  10. Redola.Rpc 的一个小目标:20000 tps

    Redola.Rpc 的一个小目标 Redola.Rpc 的一个小目标:20000 tps. Concurrency level: 8 threadsComplete requests: 20000 ...

最新文章

  1. OTN交换amp;P-OTN有效减少100G网络成本(一)
  2. 圆形的CNN卷积核?华中科大清华黄高团队康奈尔提出圆形卷积,进一步提升卷积结构性能!
  3. SAP用户出口(exit)问题--数据源增强
  4. jquery字符串转数组
  5. spring boot 读取 application.properties 初始化bean
  6. 航空订票系统界面java_Java命令行界面(第21部分):航空公司2
  7. 从源码分析RocketMQ系列-Remoting通信架构源码详解
  8. 网站制作---asp操作数据库的一个小例子
  9. ssis 映射列 使用变量_SSIS中的动态列映射:SqlBulkCopy类与数据流
  10. C#使用mybatis学习笔记
  11. 工频干扰频谱测量_力参数传感器的电阻应变测量系统
  12. linux adb 安装包下载地址,adb.exe下载|adb.exe 64位32位 官方版-520下载站
  13. CAD如何一键解决批量打印
  14. KISS保持简单:纪念丹尼斯·里奇
  15. Ubuntu16.04安装Nvidia显卡驱动与cuda和Cudnn
  16. Jib使用小结(Maven插件版)
  17. Teaching Machines to Read and Comprehend翻译
  18. 仿微信二维码极速扫描(MLKit及CameraX初体验),面试宝典
  19. [深入研究4G/5G/6G专题-40]: URLLC-11-《3GPP URLLC相关协议、规范、技术原理深度解读》-5-5G Qos原理与架构: 切片、PDU会话、QosFlow、5QI、DRB
  20. 深耕硬科技,香港科大百万创赛与八大投资机构签署合作意向

热门文章

  1. Nginx基本配置备忘
  2. 两道考研算法设计题- 2010 2013
  3. prototype.js之$A(iterable)
  4. 使用telnet登录varnish3.x管理缓存时认证问题
  5. fopen()函数的文件模式
  6. C#中创建线程的四种方式
  7. Linux系统编程 -- 进程 信号
  8. android修改对话框大小设置,android – 如何更改对话框首选项消息的文本大小?...
  9. python 边缘计算_OpenEdge首页、文档和下载 - 边缘计算平台 - OSCHINA - 中文开源技术交流社区...
  10. Prototype的JSON支持