This brief article introduces a replacement to the MSWC.PermissionChecker component that was an unsupported add-on from the IIS Resource Kit. The PermissionChecker was a COM-based component in the permchk.dll file.
Many folks have transitioned from using a 32-bit web service to a 64-bit web service and have discovered that some of their IIS components are no longer available. Such is the case with the MSWC.PermissionChecker, as it is a 32-bit only component and doesn't work in the 64-bit world.
I've created a replacement for the PermissionChecker that works in the following scenarios:
- Web or Windows Form application
- Classic ASP (COM) or .Net Framework v2 (or greater)
- 32-bit or 64-bit
Yep, that's one versatile DLL file...
The following is how you'd use the CheckPermission.dll file in an application:
Dim cp As New CheckPermission.CheckPerm Dim ans As Boolean ans = cp.CheckPerm("C:\Temp\SomeFile.txt", "SomeDomain\SomeUserName", "Read") If ans Then MsgBox("Permission is granted") Else MsgBox("Permission is denied") End If