惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News | PayPal Newsroom
IT之家
IT之家
Jina AI
Jina AI
博客园 - 司徒正美
GbyAI
GbyAI
WordPress大学
WordPress大学
B
Blog
大猫的无限游戏
大猫的无限游戏
Y
Y Combinator Blog
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Recorded Future
Recorded Future
T
Threat Research - Cisco Blogs
AWS News Blog
AWS News Blog
Latest news
Latest news
宝玉的分享
宝玉的分享
小众软件
小众软件
NISL@THU
NISL@THU
C
CERT Recently Published Vulnerability Notes
The GitHub Blog
The GitHub Blog
P
Privacy & Cybersecurity Law Blog
P
Palo Alto Networks Blog
Spread Privacy
Spread Privacy
Last Week in AI
Last Week in AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
量子位
博客园_首页
T
The Exploit Database - CXSecurity.com
The Cloudflare Blog
M
MIT News - Artificial intelligence
H
Help Net Security
Security Archives - TechRepublic
Security Archives - TechRepublic
V2EX - 技术
V2EX - 技术
I
InfoQ
D
Darknet – Hacking Tools, Hacker News & Cyber Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
O
OpenAI News
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Privacy International News Feed
Microsoft Security Blog
Microsoft Security Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Google DeepMind News
Google DeepMind News
H
Hacker News: Front Page
W
WeLiveSecurity
N
News and Events Feed by Topic

博客园 - 置身珠海,学习与奋斗

【转】WPF获取路径解读 善用Wink,将电脑操作录屏为flash (更新图片) [转]ClickOnce部署出现 系统必备的安装位置未设置为组件供应商的网站,无法在磁盘上找到 dotNetFx40LP_Client_x86_x64cs.exe 问题的解决方案 D60 单反相机拍照后,反光板无法正常弹回,报错的解决办法。 关于ListBox绑定到自定义对象 VS 全部补丁包(20100730) 和谐UAC与应用程序配置,抛砖引玉,希望完美解决问题。 论企业信息化的三个阶段:技,术,道 关于ClickOnce在企业内部的应用 中国式管理 Virtual PC 2007 虚拟网络配置 红旗飘扬 关于 Winform 下 ReportViewer 打印异常 咱也写个小写数字转大写金额 ,纯粹字符串操作实现 中国人成功十要 有没有朋友做过动态表结构的,请教一下 使用PPC的朋友慎用 星空极速3.2.070416_GD 关于89S51单片机数码管显示的小工具 重新启动IIS的小工具
自定义app_offline.htm,让网站升级提示更专业
置身珠海,学习与奋斗 · 2007-06-19 · via 博客园 - 置身珠海,学习与奋斗

用 VS2005 发布新网站时,VS会自动上传个 app_offline.htm 到网站上。

这时,所有的网站连接都成为如下图所示:
r_offline.jpg

提示信息对开发者来说,有点用处。但是,对于正在访问中用户来说,实在是蹩脚。

那么,如何让升级的时候,给访问用户一个良好的信息提示呢?

答案很简单,修改VS2005里的这个文件 app_offline.htm
路径: C:\Documents and Settings\Silver\Application Data\Microsoft\VisualStudio\8.0
(路径与VS2005安装目录有关)

以下发个修改示例:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>网站升级中</title>
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
</head>
<style>
div {
    background-color:#ffffcc;
    padding-top:10px;
    padding-bottom:10px;
    padding-left:10px;
    padding-right:10px;   
    border-style:solid;
    border-color:Black;
    border-width:1px;
}
  #WaitTimeSpan { color: blue; font-family: verdana; font-weight: bold; }
  body{ font-size: 42pt; background-color: silver; text-align:center; }
 
</style>
<body>
  <div> 
<p>网站正在升级中……</p>
<p>请稍等 <span id="WaitTimeSpan">61</span> 秒……</p>
<p>敬请谅解!</p>
  <p>Web Site Update in progress. </p>
  <p>Please wait for a moment.</p>
  </div>
<script type="text/javascript">
function Goto()
{
    var waitTimeSpan = document.getElementById("WaitTimeSpan");
    var seconds = parseInt(waitTimeSpan.innerText);
   
    if (seconds == 0)
    {
        location.href = location.href;
        return;
    }
    else
    {
        seconds--;
        waitTimeSpan.innerText = seconds.toString();
    }   
    setTimeout("Goto()", 1000);
}
Goto();
</script>
</html>

参看示例:
r_WebSiteUpdate.jpg