简体   繁体   English

无法从Visual Studio部署Web应用程序

[英]Unable to deploy web app from Visual Studio

I'm trying to deploy an Azure web app using Visual Studio, but am receiving the following error. 我正在尝试使用Visual Studio部署Azure Web应用程序,但收到以下错误。 I've deployed this app and many others without problems in the past. 过去,我已经部署了这个应用程序以及许多其他应用程序,没有出现任何问题。

Web deployment task failed. ((5/3/2016 9:40:16 PM) An error occurred when the request was processed on the remote computer.)

(5/3/2016 9:40:16 PM) An error occurred when the request was processed on the remote computer.
An error was encountered when processing operation 'Create File' on 'D:\home\site\wwwroot\ApplicationInsights.config'.
The error code was 0x80070013.
The media is write protected.

  at Microsoft.Web.Deployment.NativeMethods.RaiseIOExceptionFromErrorCode(Win32ErrorCode errorCode, String maybeFullPath)
  at Microsoft.Web.Deployment.FileStreamEx.CreateInstance(String path, FileMode fileMode, FileAccess fileAccess, FileShare fileShare, Nullable`1 fileLength)
  at Microsoft.Web.Deployment.FilePathProviderBase.Add(DeploymentObject source, Boolean whatIf) 

I'm getting the error on all my web apps, what could be wrong? 我在所有Web应用程序上都遇到了错误,这可能是什么问题?

I've been deploying different types of Web Apps to Azure quite frequently (without any issues) so maybe I can suggest some steps to troubleshoot your scenario. 我已经经常将各种类型的Web应用程序部署到Azure(没有任何问题),因此也许我可以建议一些步骤来解决您的情况。

  1. First of all, make sure you have the latest updates for your version of Visual Studio. 首先,请确保您具有适用于您的Visual Studio版本的最新更新。 If you don't have VS2015 yet, get the free Community Edition of VS2015 to try kit out. 如果您还没有VS2015,请获取免费的VS2015社区版以尝试安装。

  2. Try deploying a brand new project right after clicking File | 单击文件|立即尝试部署全新项目。 New | 新的| Project. 项目。

  3. Try deploying using multiple methods: Publish menu, FTP, continuous deployment via source control. 尝试使用多种方法进行部署:发布菜单,FTP,通过源代码控制进行连续部署。

  4. Try creating a new Web App in a different pricing tier and/or a different region. 尝试在不同的定价层和/或不同的区域中创建新的Web应用程序。

Hopefully, you'll get it to work trying one or more of the above suggestions, and then report back here about what worked and what didn't. 希望您能够尝试上述建议中的一项或多项,然后在此处向您报告哪些有效,哪些无效。 Feel free to ask any follow-up questions any particular step that you may need help with. 随时随地询问您可能需要帮助的任何后续问题。

Best of luck! 祝你好运!

Adding to @Shahed, sometimes, if you are updating a Web App through Visual Studio Publish, it might fail if some file is being used by a running process . 有时,如果添加到@Shahed,则通过Visual Studio Publish更新Web应用程序,则如果正在运行的进程正在使用某些文件 ,则该应用程序可能会失败。 I found out that if I Restarted the Web App on the Portal, the VS Publish worked like a charm. 我发现,如果我在门户网站上重新启动 Web应用程序,则VS Publish就像一个魅力。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM