Hi,
I'm using Powerbuilder 2019 R2 and import a .NET Framework DLL 4.6 (Created Custom), encapsulate the dotnetassembly in the dotnet object as recommended.
When I run the program on the server side, i'm getting this error (Locally, i don't have any problem):
"
Error Text: 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."
I try few ways of fixing this, but none fixed it:
1) Create a properties files for my dll (myDLL.config) like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
2) create a properties files for my powerbuilder executable (myPowerbuilderApp.config) (didn't think it will work, but try it...) like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
3) set true to the propertie "customappdomain " in the .net object
lnv_assembly = Create DotNetAssembly
ll_status = lnv_assembly.LoadWithDotNetFramework(This.is_AssemblyPath,true)
I cannot put a config file on the server side.
Any ideas?
Thanks,