.netcore 发布到iis不能访问文件问题

1.不能访问??F:/saas/web.config文件

增加dotnet-hosting-3.1.4-win环境的安装,参考:https://blog.csdn.net/weixin_33757609/article/details/93693395

2.找不到找不到http://localhost:8091/swagger文件,参考http://tnblog.net/aojiancc2/article/details/7393

实际web.config文件内容如下:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\KKBM.Saas.Admin.Api.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
        <environmentVariables>
          <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
        </environmentVariables>
      </aspNetCore>
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 73573291-4963-49B3-849A-3E5A833A092B-->

3.加入.xml文件

 

posted on 2022-07-08 11:21  叶子牛牛  阅读(289)  评论(0编辑  收藏  举报