1

This problem first came about when I learned that a client of ours was running into permission errors on their site.

[IOException: The media is write protected.]

System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +11804343
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +1326
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +60
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) +54
System.Xml.XmlWriterSettings.CreateWriter(String outputFileName) +155
System.Xml.XmlWriter.Create(String outputFileName, XmlWriterSettings settings) +23
System.Xml.Linq.XDocument.Save(String fileName, SaveOptions options) +116
Umbraco.Core.Services.ApplicationTreeService.LoadXml(Action`1 callback, Boolean saveAfterCallback) +202
Umbraco.Core.Services.ApplicationTreeService.Intitialize(IEnumerable`1 existingTrees) +68
Umbraco.Web.Trees.ApplicationTreeRegistrar.ScanTrees(ApplicationContext applicationContext) +667
Umbraco.Web.Trees.ApplicationTreeRegistrar.ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) +9
Umbraco.Core.ApplicationEventHandler.OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) +37
Umbraco.Core.CoreBootManager.<Complete>b__5(IApplicationEventHandler x) +19
Umbraco.Core.EnumerableExtensions.ForEach(IEnumerable`1 items, Action`1 action) +141
Umbraco.Core.CoreBootManager.Complete(Action`1 afterComplete) +94
Umbraco.Web.WebBootManager.Complete(Action`1 afterComplete) +38
Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e) +154
Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e) +9

[HttpException (0x80004005): The media is write protected.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9966013
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +352
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): The media is write protected.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9947380
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261

So I tried to connect to the server with

ftp://waws-prod-bay-###.ftp.azurewebsites.windows.net

to troubleshoot the issue. Unfortunately, it errored out with the following message.

Can't connect to 'waws-prod-bay-###.ftp.azurewebsites.net' on port 21. Check the server name and proxy settings. If the settings are correct, the server may be temporarily unavailable.

So I tried creating a second ftp user, since the current one wasn't shown in the FTP/DEPLOYMENT USER field underneath the app's properties. This failed too.

Then I tried downloading the publish settings and used the credentials in there. No luck.

Lastly, I tried creating a new a new app to see whether it was a problem for all apps on the account or just the one. While it took much longer than usual to initialize, I was able to ftp into it once it was done.

Any ideas on what the problem is? I had found this, which lead to this which says the problem (or a similar one at least) was resolved about 8 months ago.

Thanks for the help.

Edit:

I am able to ftp now, but I'm not going to flag this as resolved, since I don't know what fixed it. If anyone encounters this issue, please try juvchan's suggestion in the comments.

Community
  • 1
  • 1
  • Have you tried to Kudu into your website via waws-prod-bay-###.scm.azurewebsites.net? – juvchan Feb 24 '16 at 06:42
  • This seems more appropriate for a more software/system administrative related exchange site. – David Feb 24 '16 at 13:59
  • Stack Overflow is own of the two forums Microsoft recommends for azure questions ([https://azure.microsoft.com/en-us/support/forums/](https://azure.microsoft.com/en-us/support/forums/)). The site worked yesterday, but now it's down again. I'm able to ftp this time though, so this question is technically resolved. My guess is the ftp problem was an azure issue. – Jesse Andrews Feb 25 '16 at 18:10
  • Woops typo. Should by **"one"**, not **"own"** – Jesse Andrews Feb 25 '16 at 18:25

1 Answers1

0

I would recommend trying the following to gain access

  • The simplest thing to try would be to restart the app in the portal. I've seen this same issue and restarting the app fixes it.
  • If that does not work, try actually resetting the deployment credentials rather than adding a new user.

To reset your deployment credentials go to the web app blade, click on All Settings -> Deployment Credentials. It will then let you reset the username AND password. Again; I have seen this as an issue too.

enter image description here

Joe Raio
  • 1,795
  • 1
  • 12
  • 17
  • I had tried this, but it wasn't working when I tried to ftp at the time. The credentials I had created work now, so azure might have just been slow to propagate them. – Jesse Andrews Feb 25 '16 at 18:23
  • Ok great! Can you mark as answer so future people finding this will see that resetting the credentials does work as a solution. Thanks! – Joe Raio Feb 25 '16 at 19:58
  • I'm not sure this is the answer. My previous comment was just speculation. When I tried this, it did not immediately resolve the issue. – Jesse Andrews Feb 27 '16 at 01:14