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

查看:327
本文介绍了为什么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文件不断出台,不速之客,在我的web项目!

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'已存在此Web site.Error:该操作无法完成。未指定的错误),我回去看项目,它就在那里再次,大到生活中,我怀疑它是否能够将它在我吹树莓。 :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"

<一个href="http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx">http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx

<一个href="http://www.$c$cproject.com/KB/aspnet/app_offline.aspx">http://www.$c$cproject.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? <一href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=102778">http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=102778

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

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

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