Issue with SetNamedSecurityInfo Returning Error Code 59 on Shared File

Rishi C 0 Reputation points
2024-09-30T09:10:36.2966667+00:00

Hello,

I am encountering an issue with the **SetNamedSecurityInfo **API while attempting to modify the security settings of shared files. I have five shared files, and the API works as expected on four of them. However, for one specific shared file, the API returns error code 59 (ERROR_UNEXP_NET_ERR: An unexpected network error occurred), even though the file is fully accessible via the Microsoft Management Console (MMC).

Could you please advise on why this specific file would trigger error 59 in **SetNamedSecurityInfo **while being accessible through MMC, and how I can resolve this issue?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,609 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.