为什么 app_offline.htm 一直出现在我的 web 项目中? [英] Why does app_offline.htm keep appearing in my web project?

查看:19
本文介绍了为什么 app_offline.htm 一直出现在我的 web 项目中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我定期(每隔几天左右)将我的 ASP.NET Web 项目发布到本地 Web 服务器.

I regularly (every few days or so) publish my ASP.NET web project to the local web server.

但最奇怪的事情一直在发生……一个名为app_offline.htm"的文件不断出现在我的网络项目中,未经请求!

But the weirdest thing keeps happening... a file called "app_offline.htm" keeps appearing, unbidden, in my web project!

我已多次删除此文件,它不在源代码管理中,而且 AFAIK 没有其他人篡改该项目.但几乎每次我尝试发布项目时,我的发布都会失败(无法将app_offline.htm"添加到网站.该网站中已存在文件app_offline.htm".错误:操作可能没有完成.未指明的错误),我回去看看这个项目,它又出现了,像生命一样大,我怀疑它是否会向我吹覆盆子.:p

I have deleted this file several times, it is not in source control, and AFAIK nobody else is tampering with the project. But practically every time I try to publish the project, my publish fails (Unable to add 'app_offline.htm' to the Web site. The file 'app_offline.htm' already exists in this Web site.Error: The operation could not be completed. Unspecified error), I go back to look at the project, and there it is again, large as life, and I suspect if it could it would be blowing raspberries at me. :p

阅读了一些有关此文件的内容后,我认为它是一种让您的应用脱机的简单方法.但我没有看到它应该无缘无故地随意强加给你的任何地方.

Having read up a little about this file, I gather it's meant to be an easy way to take your app offline. But I didn't see anywhere that it's supposed to impose itself on you arbitrarily for no good reason.

那么,这是哪里 *&^%$#@%!!文件来自,为什么 VS 认为我需要它?

So, where is this *&^%$#@%!! file coming from, and why does VS think I need it?

推荐答案

这是 .NET 2.0 的功能"

This is a .NET 2.0 "feature"

http://weblogs.asp.net/scottgu/存档/2005/10/06/426755.aspx

http://www.codeproject.com/KB/aspnet/app_offline.aspx

解决此问题的最简单方法是永远不要直接发布到您的服务器.无论如何你不应该......发布到本地文件夹,然后复制站点"

"The easiest way around this is to never publish directly to your server. You shouldn't anyway... Publish to a local folder then copy the site up"

您使用 Visual Studio 吗?http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?反馈ID=102778

Do you use Visual Studio? http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=102778

这篇关于为什么 app_offline.htm 一直出现在我的 web 项目中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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