<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can not Load .dll file in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/12145794#M14236</link>
    <description>&lt;P&gt;How do you go about unblocking a DLL sourced from a network folder if that option is not available in the DLL properties once it's been moved to a local folder?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 03 Aug 2023 05:45:14 GMT</pubDate>
    <dc:creator>Yehoshua18</dc:creator>
    <dc:date>2023-08-03T05:45:14Z</dc:date>
    <item>
      <title>Can not Load .dll file</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/10852391#M14228</link>
      <description>&lt;P&gt;Hello world.&lt;/P&gt;&lt;P&gt;I need help in loading a dll file created in .net&lt;/P&gt;&lt;P&gt;it loads perfectly fine in my computer but when I send it to others, they get this error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Command: NETLOAD&lt;BR /&gt;Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\hesam\Downloads\2021\12-Dec\RibbonSample.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)&lt;BR /&gt;File name: 'file:///C:\Users\hesam\Downloads\2021\12-Dec\RibbonSample.dll' ---&amp;gt; System.NotSupportedException: 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 &lt;A href="http://go.microsoft.com/fwlink/?LinkId=155569" target="_blank" rel="noopener"&gt;http://go.microsoft.com/fwlink/?LinkId=155569&lt;/A&gt; for more information.&lt;BR /&gt;at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&amp;amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&lt;BR /&gt;at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark&amp;amp; stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)&lt;BR /&gt;at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark&amp;amp; stackMark)&lt;BR /&gt;at System.Reflection.Assembly.LoadFrom(String assemblyFile)&lt;BR /&gt;at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)&lt;BR /&gt;at loadmgd()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I even suggested others trying to load my dll to install objectARX from Autodesk but still not working.&lt;/P&gt;&lt;P&gt;I also gave them the whole folder so if they application needs anything from that folder it can access it, but no luck with that.&lt;/P&gt;&lt;P&gt;how ever it does load from my computer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: Happy new year&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2022 10:22:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/10852391#M14228</guid>
      <dc:creator>a.kouchakzadeh</dc:creator>
      <dc:date>2022-01-01T10:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Can not Load .dll file</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/10852447#M14229</link>
      <description>&lt;P&gt;I found the solution.&lt;/P&gt;&lt;P&gt;I just had to right click on the file, in properties/general, I had to check mark the trust file.&lt;/P&gt;&lt;P&gt;but how can I make it a trustable file for others without making them freak them out.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2022 10:52:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/10852447#M14229</guid>
      <dc:creator>a.kouchakzadeh</dc:creator>
      <dc:date>2022-01-01T10:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can not Load .dll file</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/10852564#M14230</link>
      <description>&lt;P&gt;Where did you get the dll file? If you downloaded from somewhere from the internet, then this is a Windows OS security feature: if an executable file (exe/dll, zipped or not) is downloaded/transferred to the computer from the Internet, Windows automatically flags it as unsafe, and locks it up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you created the dll by yourself (with VS),&amp;nbsp; place it on a network drive and try to load it there, then you need to configure .NET framework to allow the DLL to be loaded from a drive outside the computer as the Miscrosoft's link indicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jan 2022 13:41:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/10852564#M14230</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-01-01T13:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can not Load .dll file</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/11453171#M14231</link>
      <description>&lt;P&gt;Hi Norman,&lt;/P&gt;&lt;P&gt;I am getting the same error.&amp;nbsp; The strange part is that for years we've been running the .DLL's from the network with no problem.&amp;nbsp; Recently we all went to new laptops and they're running Windows 11.&lt;/P&gt;&lt;P&gt;I've checked the link, but I'm a bit ignorant on where to find, or add the "&lt;SPAN&gt;loadFromRemoteSources"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;They also have a Note which reads:&amp;nbsp; &lt;FONT face="courier new,courier"&gt;In the .NET Framework&amp;nbsp;4.5, assemblies on local network shares are run as full trust by default; you do not have to enable the &amp;lt;loadFromRemoteSources&amp;gt; element.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;&lt;SPAN&gt;My Visual Studio by default is set to 4.6.1, so I would think this wouldn't be an issue.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;&lt;SPAN&gt;Thanks for any info.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 21:36:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/11453171#M14231</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-29T21:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can not Load .dll file</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/11453192#M14232</link>
      <description>&lt;P&gt;&lt;SPAN&gt;"loadFromRemoteSources" is to be added into acad.exe.config, if you have to use it. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Now that the MS document says "&lt;/SPAN&gt;In the .NET Framework 4.5 and later versions, assemblies on local network shares run in full trust by default; you do not have to enable the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;&amp;lt;loadFromRemoteSources&amp;gt;&lt;/CODE&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;element.", then you have to decide how/why you get the same error. Or is the error really the same? Have you tried to manually NETLOAD the same DLL both from local drive, and from networkshare? I had experience that the CAD plugin DLL was sent to users through large corporate network across half world, then Windows somehow think the DLL is downloaded from the Internet and flagged it as unsafe. So, the so called Local Network can be tricky to be recognized as real "Local".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 21:57:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/11453192#M14232</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2022-09-29T21:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can not Load .dll file</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/11453237#M14233</link>
      <description>&lt;P&gt;Hi Norman,&lt;/P&gt;&lt;P&gt;Thank you for such a quick reply.&lt;/P&gt;&lt;P&gt;This is the error I get:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly 'file:///L:\AutoCAD\VB_Net\FlipChip_POD_Creator_2018-DB.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;File name: 'file:///L:\AutoCAD\VB_Net\FlipChip_POD_Creator_2018-DB.dll' ---&amp;gt; System.NotSupportedException: 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 &lt;A href="http://go.microsoft.com/fwlink/?LinkId=155569" target="_blank"&gt;http://go.microsoft.com/fwlink/?LinkId=155569&lt;/A&gt; for more information.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I copied the .dll from the network and saved it locally.&amp;nbsp; If I start AutoCad and load the local one, it runs just fine.&amp;nbsp; I get the error when I load the one from the network.&lt;/P&gt;&lt;P&gt;I have a feeling the security people did something.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 22:51:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/11453237#M14233</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-29T22:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can not Load .dll file</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/11453252#M14234</link>
      <description>&lt;P&gt;Norman, as always you are awesome!!!!&lt;/P&gt;&lt;P&gt;I added the commands to the acad.exe.config and it works great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks you very much!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 23:02:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/11453252#M14234</guid>
      <dc:creator>mgorecki</dc:creator>
      <dc:date>2022-09-29T23:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can not Load .dll file</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/11530060#M14235</link>
      <description>&lt;P&gt;Hi please see the attached image and correct me if am wrong for the issue.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 04:42:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/11530060#M14235</guid>
      <dc:creator>subash.nalla</dc:creator>
      <dc:date>2022-11-04T04:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can not Load .dll file</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/12145794#M14236</link>
      <description>&lt;P&gt;How do you go about unblocking a DLL sourced from a network folder if that option is not available in the DLL properties once it's been moved to a local folder?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 05:45:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/12145794#M14236</guid>
      <dc:creator>Yehoshua18</dc:creator>
      <dc:date>2023-08-03T05:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can not Load .dll file</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/12145844#M14237</link>
      <description>&lt;P&gt;I have created my own DLL loader which programmatically unblocks the dll:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;object persistZoneId = Activator.CreateInstance(Type.GetTypeFromCLSID(Guid.Parse("0968e258-16c7-4dba-aa86-462dd61e31a3")));
IZoneIdentifier zoneIdentifier = (IZoneIdentifier)persistZoneId;
IPersistFile persisteFile = (IPersistFile)persistZoneId;
zoneIdentifier.SetId(URLZONE.URLZONE_TRUSTED);
persisteFile.Save(filename, false);&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 03 Aug 2023 06:34:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/12145844#M14237</guid>
      <dc:creator>gleeuwdrent</dc:creator>
      <dc:date>2023-08-03T06:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can not Load .dll file</title>
      <link>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/13244703#M14238</link>
      <description>&lt;P&gt;Thank you very much!!!&lt;/P&gt;&lt;P&gt;It is important to trust the file!!!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2025 08:12:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/can-not-load-dll-file/m-p/13244703#M14238</guid>
      <dc:creator>songmaverick</dc:creator>
      <dc:date>2025-01-06T08:12:59Z</dc:date>
    </item>
  </channel>
</rss>

