azure - 无法通过 FTP 访问 Azure Web 应用程序

标签 azure ftp umbraco azure-web-app-service

当我得知我们的客户在其网站上遇到权限错误时,第一次出现了这个问题。

[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

所以我尝试使用

连接到服务器

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

解决问题。不幸的是,它出错并显示以下消息。

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.

因此,我尝试创建第二个 ftp 用户,因为当前用户未显示在应用程序属性下方的 FTP/部署用户字段中。这也失败了。

然后我尝试下载发布设置并使用其中的凭据。运气不好。

最后,我尝试创建一个新的应用程序,看看这是否是该帐户上的所有应用程序都有问题,还是只有一个应用程序有问题。虽然初始化花费的时间比平时长得多,但完成后我可以通过 ftp 进入它。

关于问题出在哪里有什么想法吗?我找到了this ,这导致 this其中表示该问题(或至少是类似问题)已在大约 8 个月前得到解决。

感谢您的帮助。

编辑:

我现在可以进行 ftp,但我不会将其标记为已解决,因为我不知道是什么解决了它。如果有人遇到这个问题,请尝试juvchan's评论中的建议。

最佳答案

我建议尝试以下方法来获得访问权限

  • 最简单的尝试是在门户中重新启动应用程序。我也遇到过同样的问题,重新启动应用程序即可解决该问题。
  • 如果这不起作用,请尝试实际重置部署凭据,而不是添加新用户。

要重置您的部署凭据,请转至 Web 应用程序边栏选项卡,单击“所有设置”->“部署凭据”。然后它会让您重置用户名和密码。再次;我也认为这是一个问题。

enter image description here

关于azure - 无法通过 FTP 访问 Azure Web 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35592973/

相关文章:

python - 将 pandas 数据帧作为 xlsx 文件写入 azure blob 存储,而不创建本地文件

powershell - 在 PowerShell 中使用 WinSCP 将 FTP 与本地目录进行比较

shell - unix ftp脚本中的条件

PHP - 获取远程文件的 md5?

iis - Azure VM IIS 上的子域 (x.y.cloudapp.net)

redirect - Umbraco - 从登录重定向到上一个当前页面

c# - Umbraco 6 - 读取中央配置设置的 "correct"方式是什么?

database - 什么是表格表达式语句?

azure - Azure 上 Suave 中的 SqlDataProvider 连接字符串

c# - OpenIdConnectAuthenticationHandler : message. 状态为 null 或为空。连接到 Azure Active Directory 时