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

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

    程序池配置

    运行效果

  • 相关阅读:
    Java学习之路----计算圆形的面积和周长
    数据库系统的基本组成内容
    软件测试的含义以及测试的对象
    wg sync.WaitGroup执行顺序
    go channel
    字符串操作
    scanf
    py停止工作
    jira索引失败
    py kafka
  • 原文地址:https://www.cnblogs.com/Linc2010/p/14313981.html
Copyright © 2011-2022 走看看