The specified DSN contains an architecture mismatch between the Driver and Application
I was transferring our company websites from IIS6 to IIS7 servers today and came up against this DSN mismatch problem.
(From IIS7)
System.Data.Odbc.OdbcException: ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
To cut a long story short, the IIS7 website was looking for a 64 bit DSN version of the requested driver. The required 64 bit driver was Pervasive ODBC (of which we only had a 32 bit driver!)
My company was not going to pay to upgrade from a 32 bit to 64 bit driver. Therefore, simply setting up a 64 bit dsn was a non starter.
I had to make the website in IIS7 a 32 bit application to read the working 32 bit Pervasive ODBC driver already installed!
How to correct the problem (all in IIS7):
1) Create a new application pool
2) Name it 32BitWeb
3) Use the .NET Framework v2.0.50727
4) Pipeline Mode Classic
5) Enable 32-Bit Applications TRUE
6) Identity Network Service
7) Load User Profile False
8) Attach your website to Application Pool 32BitWeb
MOST IMPORTANTLY
9) Go into Handler Mappings and open up (Inherited) AboMapperCustom-5548907
10) Change the Executable address from:
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll
to
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
11) Click ‘Yes’ to Edit Wildcard Script Map
That’s all there is to it. I simply told the website handler mappings to use 32bit drivers instead of 64bit.