Last post Apr 03, 2015 12:25 PM by Cheng Bao
Dec 18, 2014 12:38 PM|Cheng Bao|LINK
I use new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=uploadedfile;Extended Properties=""Excel 8.0;HDR=NO;IMEX=1""");to process uploaded excel file, however I got The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine
error on production machine.
I search some solutions, download and installed
Microsoft Access Database Engine 2010
2007 Office System Driver: Data Connectivity Components
still I got same error, then I followed this link
Enabled "enable 32-bit applications" on application pool, then I found the whenever I try to connect the website, the application pool will stop, and give me service unavailable error. So, instead of install full office suit software on production web server,
what should I do?
Dec 18, 2014 05:47 PM|wim sturkenboom|LINK
I can't help you but installing the full office suite will not help; I get this type of errors on systems that have the full office suite installed.
I don't know if you found this one during your research:
Dec 18, 2014 06:03 PM|Cheng Bao|LINK
Thanks, I would give it a try later. However, if compile to 32-bits application could work, I wonder why on develop machine (also a 64-bit OS) the application works with <any cpu> compilation options
Dec 19, 2014 12:05 PM|Cheng Bao|LINK
Still, if I just compile to x86 code, same error message, if I checked enable 32-bit applications, application pool crashes.
I checked the event viewer to see why application pool crashed, it seems the url rewrite module (inetsrv/rewrite.dll) fail to load, however, 32-bit version of url-rewrite cannot be installed since this is a 64-bit OS, I am stuck again.
Mar 06, 2015 04:34 AM|Krunal Parekh|LINK
Hi Cheng Bao,
1. Check if ODBC Data Provides exists for the Excel Files.
1. Go To Control Panel > Administrative Tools > ODBC Data Sources
One of the reason could be that you haven't added excel data sources Under USER DSN.
Hope this helps.
Mar 06, 2015 07:10 AM|PatriceSc|LINK
Not sure as you are talking about the "same error message" but note that this is not enough. You have to update your code to use the driver you installed rather than Jet.
Also make sure to download the appropriate version (ie the 64 bit version if you are in 64 bit mode).
Apr 02, 2015 06:04 PM|Cheng Bao|LINK
I do have Microsoft Excel drivers installed in ODBC.
I can't add an DSN entry because it is not a static data source, I need process dynamic, uploaded excel files, which name/path I don't know in design time.
Apr 03, 2015 04:28 AM|PatriceSc|LINK
Could you confirm that you are in x64 bit mode, that you installed the corresponding x64 exe and that you changed the connection string to use Microsoft.ACE.OLEDB.12.0 ?
What is the current error message ?It shouldn't mention any more 'Microsoft.Jet.OLEDB.4.0' if you followed the correct steps but I was confused as you talked about "having the same error message".
Apr 03, 2015 12:25 PM|Cheng Bao|LINK
Thanks, you inspirited me to check driver versions.
the 64bit odbc driver is 14.0.0, the 32 bit odbc driver is 12.0.0, I changed connection string to Provider=Microsoft.ACE.OLEDB.12.0 (although project is compiled to any CPU, and target app pool is runned on 64-bit) it works