Windows Azure 移动服务 C# 后端 - App_Data

标签 windows azure azure-mobile-services

我正在将 Windows Azure 移动服务与 .net 运行时结合使用。 我正在使用 web 部署上传一个 xml 文件,该文件位于我的 app_data 目录中。 在本地执行效果很好

var doc = XDocument.Load(HttpContext.Current.Server.MapPath("~/App_Data/consultants.xml"));

但是在服务器上我得到信息:

Could not find a part of the path 'D:\Program Files (x86)\SiteExtensions\MobileServicesDotNet\1.0.303\App_Data\consultants.xml'

你有什么想法吗?我认为该文件已复制到其他地方,但我如何获取路径?

最佳 劳林

最佳答案

您的 XML 文件很可能位于以下位置:

D:\home\site\wwwroot\App_Data\consultants.xml

Azure 有一个名为 Kudu 的基于 Web 的诊断工具,它对于此类场景很有帮助。这篇博文介绍了如何通过 Azure 实例登录和使用 Kudu,Using KUDU with Windows Azure Web Sites .

关于Windows Azure 移动服务 C# 后端 - App_Data,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24158349/

相关文章:

sql - 如何根据数组插入多个实例

c# - 如何从 Xamarin.Forms 使用 Azure 移动服务?

java - WebSphere Application Server 7.0 在连接到 MQ 时忽略 Windows userId

indexing - 如何在azure云应用程序中维护lucene索引

asp.net-mvc - 并行 Blob 上传间歇性抛出 404 Bad Request

azure - 在 Azure 移动应用程序中向经过身份验证的用户添加其他声明

entity-framework - 如何 POST/PATCH 到 Azure 移动服务上的多对多关系实体?

php - 如何测试 Windows 上的文件是否可以从 PHP 中删除?

c# - AutoIT 或 User32 按钮偶尔点击工作

windows - 带有 SourceTree 的 git 和 Cygwin 路径