自app_offline.htm文件中发布 [英] Custom app_offline.htm file during publish

查看:254
本文介绍了自app_offline.htm文件中发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我发表我的ASP.NET MVC应用程序它生成一个文件app_offline.htm同时更新网站,然后删除该文件一旦发布成功的网站脱机。

When I publish my ASP.NET MVC application it generates a app_offline.htm file to take the site offline while it updates the website and then deletes the file once the publish is successful.

这是很酷的,我真的很喜欢这个想法,但我想创建自己的自定义app_offline.htm文件发布操作了解并把它放在某个地方,这不会影响我的发展网站 - 即它不 ŧ坐在我的开发网站的根渲染脱机所有的时间。

This is cool and I really like the idea, but I want to create my own custom app_offline.htm file that the publish action is aware of and put it somewhere where it doesn't effect my development site - i.e. it doesn't sit in the root of my development site rendering it offline all the time.

TIA,结果
查尔斯

TIA,
Charles

编辑:从上斯科特谷的一篇关于app_offline.htm的评论,似乎app_offline.htm文件的定制是不可能的VS 2005 - 这已经改变在VS 2008和VS现在2010

From the comments on Scott Gu's post about app_offline.htm, it seems that customization of the app_offline.htm file wasn't possible with VS 2005 - has this changed with VS 2008 and now VS 2010?

推荐答案

我知道这是旧的,但因为我找到了一个解决方案,在这里看后,我想我应该提供一个答案。 VS 11拥有出版 app_offline.htm 文件在以下位置:

I know this is old but since I found a solution after looking here I thought I should provide an answer. VS 11 holds the publishing app_offline.htm file in this location:

C:\Users\[user]\AppData\Roaming\Microsoft\VisualStudio\11.0\app_offline.htm

我测试了这一点,自定义它,如果你改变这个文件它的工作。不好的一面,当然,这是用于所有Web发布文件。

I have tested this and customized it and it does work if you change this file. The down side, of course, is that this is the file used for all web publishing.

这篇关于自app_offline.htm文件中发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆