Post

3 followers Follow
0

Keeping Extensions folder in a network path for .Net analysis

When the Extensions folder is kept in a network drive path for a .NET analysis, you are bound to encounter the following error:

DOTNET.0102:Unexpected Exception.0 ;  0  0 [Module name] 0 0  
2019-01-21 10:55:39.153340

Error MODULMSG ; Job execution An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information. 0 ; 0 0  0 [Module name] 0 0  

For  .NET analysis when extension is present in the network path, we will  have a risk that assemblies may not be loaded correctly during the analysis.

Change the extensions path to local drive and run the analysis.

Please sign in to leave a comment.

4 comments

0
Avatar

Hi Sreejith,

I have couple of scenarios in which the extension folder is there in local drive and still getting the above warning. So the solution for this issue is as below:

Navigate to this path C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config or the path where you have .NET framework installed.

Open machine.config file present in the above path and you will have <runtime\> tag inside it. 
Kindly change this tag to the below one:

<runtime>
      <loadFromRemoteSources enabled="true"/>
  </runtime>


Reopen CAST-MS and run the analysis again.

0 votes
Comment actions Permalink
0
Avatar

Hello Sreejith,

Is there any specific process configuration that has to be done during or after changing the extensions path to local drive from the network drive.

0 votes
Comment actions Permalink
0
Avatar

Hi Rahul,

Ofcourse you have to change CASTGlobalsettings.ini file when you change the path from network to local , so that CAST-MS reads the path and execute the analyzer accordingly.

0 votes
Comment actions Permalink
0
Avatar

Hi Rahul,

You can change the extensions path as follows:

To change the location of the Extensions path from its default location in %ProgramData%\CAST\CAST\Extensions\, you need to modify the following file:

  • CastGlobalSettings.ini

The file is located in the root of your CAST installation. First make sure that all CAST applications are closed, then proceed as follows:

  1. Remove the semi-colon (;) on the line containing CAST_PLUGINS_ROOT_PATH
  2. Change the path after the = sign to the location you require:

    For example:
    CAST_PLUGINS_ROOT_PATH=D:\CAST\CAST\Extensions\
  3. Save the CastGlobalSettings.ini file.
  4. Re-open the CAST Management Studio.
0 votes
Comment actions Permalink