Replacement MSWC.PermissionChecker

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:

Yep, that's one versatile DLL file...

Example Code

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")
    MsgBox("Permission is denied")
End If


Read a related article on Checking File Permissions
Download the complete VB.Net Source code: