【问题标题】:Reading an on premise file share from Java based azure web app从基于 Java 的 azure Web 应用程序读取本地文件共享
【发布时间】:2022-01-07 19:16:29
【问题描述】:

我有一个基于 java 的 azure Web 应用程序,它正在尝试连接到本地文件共享并从那里读取文件。如果我在本地尝试它与我的 ID 连接。但是当我将它托管在服务器中时,它会给出 Access denied 错误。

我无法更改文件共享中的权限并设置为所有人。如何通过提供 ID 或冒充来读取文件?

我已尝试使用以下 userauthenticator,但无法在托管环境中工作。

UserAuthenticator auth = new StaticUserAuthenticator(domain, userName, password); 

提前致谢。

【问题讨论】:

    标签: java azure-web-app-service fileshare


    【解决方案1】:

    我不认为它的身份验证问题可能是由于作为 PAAS 产品的应用服务提供的,并且此处记录了端口限制: https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#restricted-outgoing-ports

    文件共享使用端口 445 / 139,该端口仅限用于应用服务。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-18
      • 2020-11-06
      • 1970-01-01
      相关资源
      最近更新 更多