STATUS_ACCESS_DENIED (0xc0000022): Could not connect to - Azure Netapps File Share (Network Drive) access with smbj JAVA library

Sathishkumar C 1 Reputation point
2022-10-31T11:57:39.673+00:00

Trying to read files from Azure Netapps (Network Drive). We successfully mount and read files with Window File Explorer.

With the same credentials, we are trying with JAVA smbj library.

While executing the java code in eclipse, getting following error,

com.hierynomus.mssmb2.SMBApiException: STATUS_ACCESS_DENIED (0xc0000022): Could not connect to \AZUREANF.com\imagestorage
.
.
Suppressed: com.hierynomus.mssmb2.SMBApiException: STATUS_ACCESS_DENIED (0xc0000022): Error closing connection to \AZUREANF.com\IPC$

  • Share Server Name - AZUREANF.com
  • Share Folder - imagestorage

How to resolve this issue?

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,687 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SaiKishor-MSFT 17,186 Reputation points
    2022-11-01T19:36:02.27+00:00

    @Sathishkumar C Thank you for reaching out to Microsoft Q&A. I understand that you are seeing issues with reading files from Azure Netapps when executing the java code in eclipse but not when accessing it with Windows File Explorer.

    STATUS_ACCESS_DENIED-

    A process has requested access to an object, but has not been granted those access rights.

    Refer to- https://support.microsoft.com/en-us/topic/ntlm-authentication-fails-with-0xc0000022-error-for-windows-server-2012-windows-8-1-and-windows-server-2012-r2-after-update-is-applied-a4b23900-7cc2-2bb9-432d-831c79aea7a3

    This is an authentication failure rather than a storage failure. What kind of authentication are you using here? Please verify the right authentication is provided.

    Please let us know if you have any more questions and we will be glad to assist you further. Thank you!

    Remember:

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

    Want a reminder to come back and check responses? Here is how to subscribe to a notification.

    0 comments No comments