1

I'm facing this problem. I've searched for all sorts of solutions for this but to no avail, finally decided ask here.

The web application is a .net 4.0 deployed with IIS in a staging server, it has been running fine up until recently. It runs fine in production and development server.

enter image description here

The web app platform is 'Any CPU' , build in x64 machine, deployed in x64 machine. But all the reference assemblies uses 32bit and the application dll is compiled to 32bit. We set the 'Enable 32-bit applications' in the IIS app pool.

Now I have recompiled the application and all it's assemblies to x86 platform and deployed to the staging server. But the same error appears again.

I have used fusion to log to see if the System.data.dll could be loaded properly as below.

enter image description here

I think it is something to do with the server, as the website runs fine in production. There was some security patching in the staging server recently too.

Community
  • 1
  • 1
Ling
  • 11
  • 3

1 Answers1

-1

For this we have to check the GAC File in the following path. 1.c://windows/microsoft.net/assembly/GAC32--> replace the new 32bit system.dll 2.c://windows/microsoft.net/assembly/GAC64--> replace the new 64bit system.dll

Just now I resolved the problem by doing this.

  • Thanks for the answer. Will try this and see – Ling Oct 03 '17 at 05:58
  • Can you elaborate? You say to "replace the new [32/64]bit system.dll" but don't specify what we're replacing them with. – Jake Jun 22 '22 at 00:02
  • This solution worked for me ;). I was facing the similar issue when trying to run T4 template - custom tool. It seems to be expecting a 32 bit DLL within 64 bit GAC folder. Copying the 32 bit system.data.dll from 32Bit folder to 64 bit folder solved the issue. BTW I have renamed & taken a copy of 64bit dll incase major issue happens due to this – David Chelliah Jul 27 '22 at 19:51