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

相关推荐
a努力。1 小时前
腾讯Java面试被问:String、StringBuffer、StringBuilder区别
java·开发语言·后端·面试·职场和发展·架构
源码获取_wx:Fegn08951 小时前
基于springboot + vue心理健康管理系统
vue.js·spring boot·后端
优弧1 小时前
离开舒适区100天,我后悔了吗?
前端·后端·面试
QD_IT伟2 小时前
SpringBoot项目整合Tlog 数据链路的规范加强
java·spring boot·后端
源码获取_wx:Fegn08952 小时前
基于springboot + vue二手交易管理系统
java·vue.js·spring boot·后端·spring·课程设计
爬山算法2 小时前
Springboot请求和响应相关注解及使用场景
java·spring boot·后端
请为小H留灯2 小时前
Java实际开发@常用注解(附实战场景)
java·后端·个人开发
老华带你飞2 小时前
在线教育|基于springboot + vue在线教育系统(源码+数据库+文档)
java·开发语言·数据库·vue.js·spring boot·后端
码事漫谈3 小时前
VS Code终端从入门到精通完全指南
前端·后端
码事漫谈3 小时前
现代C++系统编程中类型重解释的内存安全范式
后端