Why does MATLAB 7.11 (R2010b) throw an error when I try to load a .NET Assembly from a network location?
3 ビュー (過去 30 日間)
古いコメントを表示
When I use NET.addAssembly on an Assembly located on a network drive I receive the following error:
??? Message: Could not load file or assembly
'file://\\myServer\myShare\ClassLibrary1.dll' or one of its
dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Source: mscorlib
HelpLink:
採用された回答
MathWorks Support Team
2013 年 1 月 16 日
This enhancement has been incorporated in Release (R2012a). MATLAB can now load network assemblies. For previous product releases, read below for any possible workarounds:
This is expected behavior caused by a security feature of the .NET Framework 4.0 which does not allow applications (by default) to load Assemblies from network locations.
To enable MATLAB to load Assemblies from a network location, you need to update the file
$MATLABROOT\bin\[win32|win64]\matlab.exe.config:
You will need to add the following configuration options:
<configuration>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
As there already should be some content in this file, the resulting file should look like:
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!