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.
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.
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.
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.
User contributions licensed under CC BY-SA 3.0