When you use Visual Studio 2012 to develop a Web site or Web application, you can use two types of Web server. Bring your own development server and IIS EXPRESS. Development server is the x86 version, and IIS Express is both x86 and x64 versions.
However, when referencing a 64-bit DLL, the debug error occurs because, even with IIS Express debugging, VS2012 will only invoke its 32-bit version by default. You can view what version of IIS EXPRESS is enabled by the process in Task Manager when you debug.
Later Visual Studio may integrate the debug calls of IIS Express x64, but 2012 we must modify the registry to make the VS Call x64 version of IIS Express, as follows.
REG ADD hkey_current_usersoftwaremicrosoftvisualstudio12.0webprojects/v use64bitiisexpress/t reg_dword/d 1
After the registry modification is complete, you need to restart vs2012 for it to take effect.
The above method or not can choose the following: The following methods through my verification through
Run regedit
Under Hkey_current_user\software\microsoft\visualstudio\11.0\webprojects\, add a DWORD value of "Use64bitiisexpress" with a value of 1
The point is that the 64-bit program must be running in 64-bit IIS. This is convenient for 64-bit WINDOWS7/8.
VS2012 using 64-bit IIS Express debugging