Unblock a DLL on Windows Server 2012 and Windows 10

It has been very quiet at my blog for the last two months. The main reason for this is the go-live of a big NAV2016 upgrade I’ve been working on for the last half year or so.

This blog is related to this project. We are using some DLLs for this project. Among them are Anveo and ForNAV.

Sometimes you get a new version of a dll from one of your vendors. In some cases windows might prevent you from using them. You have to unblock it explicitly.

This is the error message you might get:

ForNAV1

“Cannot create an instance of the following .NET Framework object”

Reason is that you need to go to the properties of the DLL and manually unblock it.

ForNAV2

After this is done you can use the DLL. You need Administrator previledges.

4 Comments

  1. Robert says:

    thanks for posting this as I ran into the same issue two weeks ago with some Powershell scripts that I downloaded from GitHub and once I located the “unblock” button problem solved. Only remaining issue is how to unblock entire directories of scripts;

    Liked by 1 person

  2. thegunzo says:

    You need to be running as an administrator to unblock a file directly in the add-ins folder. One option is to run File Explorer as an administrator, another is to run powershell as an administrator and the third; move the file to your desktop, unblock it, and move it back up to the add-ins folder.

    Liked by 1 person

  3. Peter Tijsma says:

    I always use the PowerShell way 🙂
    Get-ChildItem ‘C:\Program Files\Microsoft Dynamics NAV\90\Service\Add-ins\*’ -Recurse | Unblock-File

    Liked by 1 person

  4. I have added streams.exe to my scripts, but probably will change it to this neat-o-powershell thingy after this.
    Read more from streams.exe:
    https://technet.microsoft.com/en-us/sysinternals/streams.aspx

    Like

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.