zoukankan      html  css  js  c++  java
  • Asp.Net.Core5 部署

    IIS 安装

    控制面板  ->  程序  ->  启动或关闭windows功能  ->  Internet Information Service (勾选所有选项)

                            

    部署

    下载地址:https://dotnet.microsoft.com/download/dotnet/5.0

    必须安装

     

    点击项目,选择【发布】

    点击【发布】

    脚本启动

    CMD运行脚本

    D:DemoCodeDemoPublic>dotnet AspNetCore5Demo.dll --urls="http://localhost:66"

    IIS启动

    注意web.config配置

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <!-- To customize the asp.net core module uncomment and edit the following section. 
      For more info see https://go.microsoft.com/fwlink/?linkid=838655 -->
        <location  path="." inheritInChildApplications="false">
            <system.webServer>
                <handlers>
                    <!--<remove name="aspNetCore"/>-->
                    <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified"/>
                </handlers>
                <aspNetCore processPath="dotnet" arguments=".AspNetCore5Demo.dll" stdoutLogEnabled="false" stdoutLogFile=".logsstdout"
                         hostingModel="inprocess"/>
            </system.webServer>
        </location>
    </configuration>

    主意IIS中模块,是否存在,安装dotnet-hosting

    添加网站-设置网站文件地址

    程序池配置

    运行效果

  • 相关阅读:
    C++的类继承方式
    leetcode面试题53
    leetcode56 区间合并
    epoll源码分析
    C++11 lambda表达式是如何实现的?
    用 CPI 火焰图分析 Linux 性能问题
    cache
    mysql insert锁机制
    MySQL 各级别事务的实现机制
    cache line 伪共享
  • 原文地址:https://www.cnblogs.com/Linc2010/p/14313981.html
Copyright © 2011-2022 走看看