0

I have a java based azure web app which is trying to connect to an on premise file share and read a file from there. If I try locally its connecting with my ID. but when I am hosting it in the server its giving Access denied error.

I cannot alter the permissions in the file share and set to everyone. How can I read the file by providing the ID or impersonation?

I have tried with below userauthenticator but is not working in the hosting environemt.

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

Thanks in advance.

Sharon
  • 93
  • 1
  • 13

1 Answers1

0

I don't think its auth issue perhaps issue may be due to App service as PAAS offering and have port restriction documented here: https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#restricted-outgoing-ports

File share uses port 445 / 139 which is restricted to use with App services.

Rohit Tatiya
  • 361
  • 2
  • 7