I'm distributing .NET assembly in .zip archive on my project web pages.

When the assembly is downloaded using Internet Explorer and extracted using Windows Explorer, the .dll is marked as insecure and cannot be loaded. The error message is

Could not load file or assembly 'file:///...\WinSCPnet.dll' or one of its dependencies. Operation is not supported.

One has to go to file Properties and click Unblock button. Note that the assembly is digitally signed.

Unblock button

Is there any way to prevent that? It looks like downloading the file from https:// helps. But that's not an option for me, at least not in a short term. Maybe some other packaging format?

有帮助吗?

解决方案

The only option is to create installer (msi/exe/clickonce). IE/Explorer will track any files downloaded, and there is no way to disable it at server side.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top