【问题标题】:Window Azure Virtual Network: Asp.net can not access to shared folder from other virtual machineWindow Azure 虚拟网络:Asp.net 无法从其他虚拟机访问共享文件夹
【发布时间】:2013-07-05 12:36:23
【问题描述】:

在 window azure 门户中,我创建了一个虚拟网络,然后将虚拟机 (X) 和云服务 (Y) 添加到该网络中。

在云服务机器 Y 中,我可以通过窗口资源管理器访问虚拟机 X 中的共享文件夹。

问题是我无法从我的云服务 - Web 应用程序访问该共享文件夹。

返回错误:

Access to the path '\\10.0.1.5\Upload\test.txt' is denied.
Exception Details: System.UnauthorizedAccessException: Access to the path '\\10.0.1.5\Upload\test.txt' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

我确实授予了对该共享文件夹(每个人、网络服务、iis_iusr 等)的完全权限访问权限,但没有运气。

当我使用特定的用户名和密码将模拟身份添加到 web.config 时:

<identity impersonate="true" userName="username" password="pass" />

然后我得到了这个错误:

 Could not find file '\\10.0.1.5\Upload\test.txt'.

有什么想法吗?

【问题讨论】:

    标签: asp.net azure


    【解决方案1】:

    我解决了这个问题。如上所述的模拟工作得很好。我的错误是文件名不小心重复了 ext (test.txt.txt)。

    【讨论】:

      猜你喜欢
      • 2016-02-10
      • 1970-01-01
      • 1970-01-01
      • 2021-08-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-21
      • 1970-01-01
      相关资源
      最近更新 更多