asp.netcore iis中热更新

总结下来两种方式

  1. 修改web.config
  2. 新增html文件

修改web.config

这是之前写的,修改为进程外偶尔会不行
https://blog.csdn.net/qq_36437991/article/details/134090442

新增html

项目根目录下新增app_offline.htm,不是wwwroot下新增

html 复制代码
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Offline</title>
</head>
<body style="margin:3em;font-family:sans-serif">
  <h2>Offline</h2>
  <p>This site is offline for maintenance.</p>
  <!--       
    Adding some hidden content so that IE "Friendly Errors" don't keep
    this message from displaying. (It will show a "friendly" 404
    error if the content isn't at least 512 bytes.)
    This is mostly a problem for IE6 which has "Friendly Errors" on by default.
    See http://weblogs.asp.net/scottgu/App_5F00_Offline.htm-and-working-around-the-_2200_IE-Friendly-Errors_2200_-feature
    
    <h2>This site is offline.</h2>
    <h2>This site is offline.</h2>
    <h2>This site is offline.</h2>
    <h2>This site is offline.</h2>
    <h2>This site is offline.</h2>
    -->
</body>
</html>

这样访问就会显示html中的内容,更新完成之后删除即可。

参考

https://github.com/dotnet/aspnetcore/issues/52307#issuecomment-1852886535

https://blog.csdn.net/weixin_38304160/article/details/133020599
https://www.cnblogs.com/willick/p/14639682.html
https://learn.microsoft.com/zh-cn/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-8.0
http://haitao.cool/contents/2/10.html
https://www.dongchuanmin.com/net/1331.html
https://blog.csdn.net/weixin_38304160/article/details/133020599
https://www.cnblogs.com/mojie/p/16636498.html

相关推荐
硬件人某某某1 分钟前
基于Django的手办交易平台~源码
后端·python·django
闲猫6 小时前
go orm GORM
开发语言·后端·golang
丁卯4046 小时前
Go语言中使用viper绑定结构体和yaml文件信息时,标签的使用
服务器·后端·golang
bing_15810 小时前
简单工厂模式 (Simple Factory Pattern) 在Spring Boot 中的应用
spring boot·后端·简单工厂模式
天上掉下来个程小白10 小时前
案例-14.文件上传-简介
数据库·spring boot·后端·mybatis·状态模式
Asthenia041211 小时前
基于Jackson注解的JSON工具封装与Redis集成实战
后端
编程星空11 小时前
css主题色修改后会多出一个css吗?css怎么定义变量?
开发语言·后端·rust
程序员侠客行12 小时前
Spring事务原理 二
java·后端·spring
dmy12 小时前
docker 快速构建开发环境
后端·docker·容器
sjsjsbbsbsn12 小时前
Spring Boot定时任务原理
java·spring boot·后端