Showing posts with label assembly. Show all posts
Showing posts with label assembly. Show all posts

Monday, June 13, 2016

Could not load file or assembly 'Microsoft.ReportingServices.RdlObjectModel, Culture=neutral, PublicKeyToken=' or one of its dependencies. Access is denied. ax2012

Today I faced a new error while running reports in AX. "Could not load file or assembly 'Microsoft.ReportingServices.RdlObjectModel, Culture=neutral, PublicKeyToken=' or one of its dependencies. Access is denied. ax2012"

The solution to this is to give permission to all the users on the .NET folder:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files” ( Modify the framework version, root directory etc according to your environment. )

Goto folder properties, select security, select "USERS" and grant full control. Press Apply and OK.


Credit: https://blogs.msdn.microsoft.com/sayanghosh/2007/04/21/solution-to-could-not-load-file-or-assembly-or-one-of-its-dependencies-access-is-denied/

Friday, August 21, 2015

AX2012 R3: DIXF Could not load assembly error

While working on DIXF there can be scenario where you may face errors where assemblies are not able to load properly. Like below:

"Could not load file or assembly 'microsoft.dynamics.ax.framework.tools.dmf.previewgrid.dll'"

In this case you can use 2 options:

1. You can reinstall DIXF Client.
2. You can copy the dll file mentioned in the error from one AOS where it's working properly and paste it to the AOS where the error is coming. The file location is "C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin".

Saturday, September 14, 2013

Strong name validation failed

When we execute our code which refers an assembly(dll) then that assembly gets validated for the signature validation and if it's a non-signed or delay signed(in some cases) then it throws the error:

Could not load file or assembly '[Your file], Version=2.0.0.0, Culture=neutral, PublicKeyToken=[public key token]' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A).

To solve this we can disable the verification of an assembly by using sn.exe available at "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools" (depends on the Framework you are using i.e .Net framework 4.5 in my case)

Open Command Prompt and run the command:
cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools"
SN -Vr YourAssemblyName

After disabling the verification the CLR will not verify the assembly signature.

Then to re-enable the verification of the assembly run:
SN -Vu YourAssemblyName