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

相关推荐
天天摸鱼的java工程师4 分钟前
MyBatis Plus 的实用技巧:从业务场景到代码实现
java·后端·mybatis
满分观察网友z34 分钟前
解锁 Java 的“上帝模式”:我如何用反射和注解,从“测试地狱”走向“一键自动化”
后端
无奈何杨42 分钟前
CoolGuard风控节假日完善,QLExpress自定义函数
前端·后端
这里有鱼汤1 小时前
通过AI狂赚苹果26.6%,这套AI金融交易开源Agent彻底火了
后端·agent
寻月隐君1 小时前
【Solana 开发实战】轻松搞定链上 IDL:从上传到获取全解析
后端·web3·github
程序员爱钓鱼1 小时前
Go项目上线部署最佳实践:Docker容器化从入门到进阶
后端·google·go
汪子熙1 小时前
Visual Studio Code 中排除指定文件夹搜索的最佳实践与实现原理
后端·面试
大P哥阿豪2 小时前
Go defer(二):从汇编的角度理解延迟调用的实现
开发语言·汇编·后端·golang
风象南2 小时前
SpringBoot 与 HTMX:现代 Web 开发的高效组合
java·spring boot·后端
wstcl3 小时前
让你的asp.net网站在调试模式下也能在局域网通过ip访问
后端·tcp/ip·asp.net