Deployment Tips

Top  Previous  Next

If you copy your Clarion.NET application folder (or Clarion IDE) to a network drive, you may encounter the following error when attempting to run it from your local drive:

Application error:

Exception Type: System.TypeInitializationException.

That assembly does not allow partially trusted callers.

What is happening is that the program on the network drive is getting Intranet permissions according to the .NET Code Access Security (CAS). If you want programs to run from a particular network drive, you need to configure the drive to have FullTrust permissions. You can use the Microsoft .NET Framework 2.0 Configuration Tool to configure it.

To do this:

1.

Run the .NET Configuration Tool, found in your Administrative Tools section:

 

 

This tool provides a graphical interface for managing .NET Framework security policy and applications that use remoting services. This tool also allows you to manage and configure assemblies in the global assembly cache.

 

2. Expand the Runtime Security Policy->Machine->Code Groups->All Code->Local Intranet Zone tree:

 

 

3. Click Add a Child Code Group in the right-hand pane.

 

 

4. Give the new group a name and description that you like, and click Next.

 

5. Select URL in the dropdown for Choose the condition type for this code group. Then enter a URL that points to the network share (i.e., file://sv-test/ops/*), then click Next

 

6. In the drop down choose the FullTrust permission set, and click Next.

 

7. Click Finish.

That's how you do it in the UI.

You can also configure the FullTrust permissions for a drive from the SDK Command Prompt, using the Code Access Security Policy tool (caspol.exe).

CasPol.exe -pp off -m -ag 1.2 -url file://X:/* FullTrust