Previous Topic

Next Topic

Book Contents

Book Index

Building 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, if the assembly for the user-defined function is not signed with a strong named signature that is valid and trusted, the function does not work in the InForm application.

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.

  1. 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:

  2. Open a Command Prompt window.
  3. Navigate to the directory where your PFX file is located.
  4. Run the following command:

    sn -i <PFX file name> <container name>.

    where:

  5. Build the user-defined function assembly.
Copyright © 2013 Oracle and/or its affiliates. All rights reserved.