如何同时采取发布的Web应用程序离线? [英] How to take web app offline while publishing?

查看:541
本文介绍了如何同时采取发布的Web应用程序离线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很多时候,当我打的发布的在VS13,我得到现场编译,但我在上传时得到的错误说一个文件是忙。

Very often, when I hit Publish in VS13, I get the site to compile but when uploading I get the error saying that a file is busy.

更新文件(MyAzureSite \\ precompiledApp.config)。结果
  C:... \\ 12.0 \\网络\\ Microsoft.Web.Publishing.targets(4255,5):结果
  错误ERROR_FILE_IN_USE:Web部署任务失败结果。
  (该文件'precompiledApp.config'正在使用中。结果
  了解更多:<一href=\"http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE\">http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.)

Updating file (MyAzureSite\PrecompiledApp.config).
C:...\v12.0\Web\Microsoft.Web.Publishing.targets(4255,5):
Error ERROR_FILE_IN_USE: Web deployment task failed.
(The file 'PrecompiledApp.config' is in use.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.)

当我按照提供的链接,它的建议,我应该去的启用appOffline规则的。 当然!我心里想着。但是如何?我GOOGLE了它,只得到了一堆的是应该更换网站在发布该文件命中​​。不过,我得到关于如何摆脱我的小问题,没有资料。

When I follow the link provided, it's suggested that I should go for enabling the appOffline rule. "Sure!", I think to myself. But how?! I've googled it, only to get a bunch of hits on the file that's supposed to replace the site while publishing. However, I get no info on how to get rid of my little problem.

我就简单的方法,并从我的Azure网站下载的发布配置文件,现在我用它(你知道,<大骨节病> ALT + <大骨节病>乙 + <大骨节病> ^ h )。

I went the easy way and downloaded a publishing profile from my Azure web site and now I'm using it (you know, ALT+B+H).

现在我通过进入门户网站的Azure解决的问题,并采取人工现场离线。然后,我可以发布,之后我拿上线的站点。极不现实的痛苦和乏味的。

Right now I resolve the problem by going to the portal for Azure and manually take the site off-line. Then I can publish and after that I take the site on-line. Highly impractical and painfully tedious.

是什么原因造成这一点,我怎么杀呢?

What is causing this and how do I kill it?

推荐答案

您实际上是在发布配置文件(.pubxml)配置。只需将元素添加到的PropertyGroup是这样的:

You actually configure it in the publishing profile (.pubxml). Just add the element to the PropertyGroup like this:

<PropertyGroup>
  <EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>
  ...
</PropertyGroup>

MSDN文档中更多

这篇关于如何同时采取发布的Web应用程序离线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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