Signing user-defined function assemblies
If a study contains a user-defined function that performs a task such as reading from or writing to a file, accessing the database or the registry, making web service calls, running an external application, sending an email, or using the event log directly, the assembly for the user-defined function must be signed with a strong named signature that is valid and trusted in order for the function to work in the InForm application. For more information, see Securing user-defined functions.
Note: For InForm studies hosted by Oracle, all user-defined function assemblies that require signing must be signed by Oracle Services prior to deployment.
When you create a user-defined function with an assembly that you want to secure and sign, on each machine in your environment that builds assemblies, use the following procedure to install a PFX signing file to a crypto service (CSP) certificate container. The PFX file is then used to secure and sign the assembly for the user-defined function.
- Add the following to the AssemblyInfo.cs file for your project:
// Tell compiler to use whatever key pair is stored in <container name> CSP container. Ignore
// warning that this can be done via command-line switch
#pragma warning disable 1699
[assembly: AssemblyKeyName("<container name>")]
#pragma warning restore 1699
where:
- container name—CSP container name.
- Open a Command Prompt window.
- Navigate to the directory where your PFX file is located.
- Run the following command:
sn -i <PFX file name> <container name>.
where:
- PFX file name—PFX signing file name.
- container name—CSP container name.
- Build the user-defined function assembly.