c# - Windows Azure : System. UnauthorizedAccessException:访问路径“E:\approot\”

标签 c# azure

我的项目中有一个 xml 文件,该文件应该用于读取操作。当我在本地计算机上运行该项目时,它工作得很好,但是它抛出 System.UnauthorizedAccessException: Access to the path 'E:\approot\...当我部署 worker 角色时。

我已检查该文件是否存在于该目录中。

如何解决这个问题?

谢谢。

最佳答案

您需要在提升模式下运行角色...通过添加 csdef 中的 < RuntimeexecutionContext ="elevated"/>。

关于c# - Windows Azure : System. UnauthorizedAccessException:访问路径“E:\approot\”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16108099/

相关文章:

azure - 在azure门户中创建调度程序时出现"Can not find subscription"错误

Azure 数据工厂事件副本 : Evaluate column in sink table with @pipeline(). TriggerTime

c# - 如何使 WebView 控件静音(禁用声音)?

c# - .NET 4.0 框架中是否已经存在以下泛型方法?

c# - F# 支持多核

C# 多个正则表达式替换字符串 - 内存太多

c# - 在工作组的情况下,如何在远程计算机上授予 Windows 服务访问权限?

azure - 在 Azure Analytics 作业中设置日期时间格式

azure - 在azure服务器中执行存储过程

azure - 如何从管道 Azure DevOps 访问私有(private)存储库?