Question

How to Disable .Net Strong Name Verification for All .Net assembly in system by config .net framework or IIS or project's config?

http://nvea.host56.com/up/726daf2c9ee0.png (click for larger image)

No correct solution

OTHER TIPS

Try add it in regestry:

OS x32:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,af24b530b87e22f1]

OS x64:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,af24b530b87e22f1]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,af24b530b87e22f1]

and add it to your Web.config:

<system.web>
   <hostingEnvironment shadowCopyBinAssemblies="false" />
</system.web>

To disable strong name validation for all assemblies on your machine you can run:

sn.exe -Vr *

from a Developer Command Prompt for VS201*

This is an exception I received:

Error Type: System.IO.FileLoadException
Error Message: Could not load file or assembly 'MyAssemblyName, Version=5.1.0.0,  Culture=neutral, PublicKeyToken=30b439e30eee46b4' or one of its dependencies.
Strong name  validation failed. (Exception from HRESULT: 0x8013141A)

This is a solution which worked for me to disable strong name validation for a particular assembly while testing it within totally signed service:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\MyAssemblyName,30b439e30eee46b4]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\MyAssemblyName,30b439e30eee46b4]

You have to create those new keys in the registry, keys have no values under them. You can copy these two lines into .reg file, change assembly name and its guid and double-click it to merge into the Registry.

Note: assembly name is your filename without .dll extension, exactly as it shows in the exception.

Then restart your app/service.

I think the answers above with * instead of assembly name should also work.

Below Entries will work:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\*,af24b530b87e22f1]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\*,af24b530b87e22f1]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top