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

相关推荐
凌览3 小时前
一键去水印|5 款免费小红书解析工具推荐
前端·javascript·后端
枫叶梨花3 小时前
一次 Kettle 中文乱码写入失败的完整排查实录
数据库·后端
expect7g3 小时前
Paimon源码解读 -- PartialUpdateMerge
大数据·后端·flink
申阳3 小时前
Day 16:02. 基于 Tauri 2.0 开发后台管理系统-项目初始化配置
前端·后端·程序员
bcbnb3 小时前
游戏上架 App Store 的完整发行流程,从构建、合规到审核的多角色协同指南
后端
JavaGuide3 小时前
美团2026届后端一二面(附详细参考答案)
java·后端
aiopencode3 小时前
无需源码的 iOS 加固方案 面向外包项目与存量应用的多层安全体系
后端
语落心生4 小时前
Apache Geaflow推理框架Geaflow-infer 解析系列(六)共享内存架构
后端
语落心生4 小时前
Apache Geaflow推理框架Geaflow-infer 解析系列(七)数据读写流程
后端
语落心生4 小时前
Apache Geaflow推理框架Geaflow-infer 解析系列(五)环境上下文管理
后端