我的项目中有一个 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/