Salesforce

Using Magic xpa in a Network Installation (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Using Magic xpa in a Network Installation (Magic xpa 4.x)

Objective

This Technical Note explains how you can use the Magic xpa Runtime engine from a network installation.

Description

The .NET runtime security policy (by default) disables code from running if it exists on a network drive. To run the Magic xpa Runtime engine from a network drive you need to adjust your security policy.

Solutions

For regular workstations do the following:

  1. Check if you have an EXE file called: caspol.exe in the framework directory, such as: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\

    You can read about Caspol at the following locations:

    http://msdn2.microsoft.com/en-us/library/cb6t8dtz(VS.80).aspx


    http://msdn2.microsoft.com/en-us/library/073ba759.aspx

  2. Open the command line and run one of the following commands:

c:\Windows\Microsoft.NET\Framework\v4.0.30319\caspol.exe -machine -addgroup All_Code -strong -file <path>MgxpaRuntime.exe -noname -noversion FullTrust -name Magicxpa_Assemblies_Access -description "Code group granting trust to Magic xpa assemblies"

Where <path> is the runtime location, such as: ‘z:\magicxpa’.

Or:

c:\Windows\Microsoft.NET\Framework\v4.0.30319\caspol.exe -machine -addgroup 1.2 –url file:<path>/* FullTrust -name Magicxpa_Assemblies_Access -description "Code group granting trust to Magic xpa assemblies"

Where <path> is the runtime location in URL format, such as: ‘//gourixp/magicxpa’.


This command needs to be executed only once in each of the computers.

Note that the network mapping might be different, so the file reference should be modified accordingly.

  1. On XP machines, you might need to use the following command:

<path to caspol.exe>\CasPol.exe -m -ag 1.2 -url file://Network_PC_Name/Share_Name/* FullTrust


We recommend creating a batch file that will run the command and then executing the batch file on each workstation.

If you have .NET 2 SDK do the following:

  1. Run: Control Panel\Administrative Tools\Microsoft .NET 2 configuration.

  2. Go to run time security policy\machine\code groups\all_code.

  3. Right-click on all_code and select the New option.

  4. Give the code a name, such as RG, and click Next.

  5. Select URL, specify the URL of the Magic xpa folder with \* (for example: \\gourixp\Magic xpa 2.2\*), and click Next.

  6. Select full trust, click Next and then click Finish.

    Don't forget to specify \* after the name.

Reference
Attachment 
Attachment