I am developing a .NET website that is using Windows Authentication.
I have a requirement to make website password policy exactly same as the Windows password policy which is under: (gpedit.msc) Computer Configuration\Windows Settings\Security Settings\Account Policies\Password Policy
How can I programmatically access these Windows password policy settings in C#?
PS I had a look at Windows Management Instrumentation but couldn't find the correct path which points to Windows password policy.
using System.Management;
ManagementScope scope = new ManagementScope(new ManagementPath("some_path"))
PS2 Please don't tell me to modify web.config file and changing tags. I know it's the easiest solution, however, I need the website to automatically match the default password policy of Windows host PC... sounds weird but that's the requirement.