I'm trying to deploy an Azure web app using Visual Studio, but am receiving the following error. 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?
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.
First of all, make sure you have the latest updates for your version of Visual Studio. If you don't have VS2015 yet, get the free Community Edition of VS2015 to try kit out.
Try deploying a brand new project right after clicking File | New | Project.
Try deploying using multiple methods: Publish menu, FTP, continuous deployment via source control.
Try creating a new Web App in a different pricing tier and/or a different region.
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. I found out that if I Restarted the Web App on the Portal, the VS Publish worked like a charm.
User contributions licensed under CC BY-SA 3.0