This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

User A is attempting to register a K2 Custom Control by running the below command as Administrator using the controlutil.exe utility:

controlutil.exe register -assembly:"%PROGRAMFILES%\K2\K2 smartforms Designer\bin\CustomControl.dll"


They then run into these errors in the console:

  • "RegisterControlTypes Failed: Cannot delete control: Not authorized on object [CustomControl]"
  • "SourceCode.Forms.Management.NotAuthorizedException: Cannot delete control: Not authorized on object [CustomControl]" 


Looking into the EventViewer log files you should also be able to see this error:

22029 The current user must be in one of the configured Administrator roles/groups

Symptoms

The errors point to some permissions which are not in place.

Troubleshooting Steps

Look at the permissions below for the user attempting to register the Custom Control:
1. sysadmin and/or db_owner on K2 database
2. In the K2 Management site navigate to 'Server Rights' and make sure the account has Admin permissions on the K2 Server.

We added Admin Rights on the K2 Server for User A and they were then successfully able to register the Custom Control.