This article refers to legacy products, components or features. Therefore, the content in this article is offered "as is" and will no longer be updated. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.
For security reasons the K2 Server in K2 blackpearl 0807 will only load custom assemblies that have been registered in the K2 Database. This means that at startup, if the K2 Server is required to load a custom assembly then the custom assembly must be registered. Otherwise, only the default or out of the box assemblies will load when the server starts up.
This requirement applies to the assembly that implements the secuirty interface, for example IHostableSecurityProvider and excludes the assembly(ies) that are referenced by the assembly implementing the interface.
To clarify this: If assembly A implements IHostableSecurityProvider, and assembly A references assembly B then only Assembly A must be registered in the K2 Database. Assembly A must be copied into the [Install Directory]\K2 blackpearl\Host Server\bin\SecuirtyProviders and assembly B, the referenced assembly(ies) must be copied to [Install Directory]\K2 blackpearl\Host Server\bin.
How to register the assembly
The steps required to register the assembly are provided below:
- The assembly that contains your Security Provider, must be signed. Get the public key token for the assembly.
To obtain the Public token key do the following
- Open the Visual Studio command promt
- Type: sn.exe -T [full path to strong named assembly]
- Run the following script against the Host Server database:
INSERT INTO [HostServer].[dbo].[AssemblyRegistration]
Where [AssemblyName] is the name of the assembly example: SourceCode.Security.Providers.SampleProvider (excluding the ‘.dll’, i.e. not the strong name) Where [PublicKeyToken] is the public key token that you signed the assembly with, obtained in step 1.
- Make the following change to the [Install Dir]\k2 blackpearl\Host Server\Bin\K2HostServer.config file
<add key="useassemblyregistration" value="true" />
- Restart the K2Server.