1

I developed a .net-core web page with an angular project. After i developed it i wanted to host this website via IIS. this worked fine on my computer where i developed it. After that worked i wanted to host it on another Computer but there it's not working. I get this error message. System.InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. After i got this error i watched in the Internet what i can do against this. Nearlly all posts i found says that i need to install Microsoft Access Database Engine 2010. I thought ok may it works. Surprise it didn't.

Does anyone has any ideas what i can do against this error?

NiSu
  • 105
  • 1
  • 16
  • Did you check if you needed the 32- or 64-bit version? Please see ['Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine](https://stackoverflow.com/a/15032191/1115360) for more information. – Andrew Morton Oct 10 '20 at 11:36
  • i need 64-bit version. I compiled it with x86. – NiSu Oct 10 '20 at 11:42
  • i didn't made it for myself. they do it with an access database. So unfortunately i need to do it with access. – NiSu Oct 10 '20 at 11:43
  • so you say i need a 32-bit version? – NiSu Oct 10 '20 at 11:48
  • i will try it. thanks for the info. – NiSu Oct 10 '20 at 11:57
  • @AndrewMorton i compiled my project in 64-bit but it don't work. Shouldn't it accomplish the same? – NiSu Oct 10 '20 at 12:12
  • im still getting the same error. – NiSu Oct 10 '20 at 12:29
  • You either force your .net project to x86, or you force your project to x64. However, if IIS is involved, then you have to set/decide if you going to run IIS in x32 or x64 bit mode. The machine OS don't matter - they been x64 for 10 years now. What matters however is what bit size version. This becomes more complicated since you ALSO running IIS, and if that is the wrong big size, then even more issues come into play. – Albert D. Kallal Oct 10 '20 at 16:36
  • @AlbertD.Kallal but it should't even matter cause i tried both versions – NiSu Oct 10 '20 at 17:06
  • @AndrewMorton sadly this is not possible cause they are using another software (from another company) and there they use this access database. – NiSu Oct 10 '20 at 18:11
  • @NiZelooer I suggest that you install Server 2016 as a Hyper-V machine and find out which combination of your project and the ACE.OLEDB provider works. – Andrew Morton Oct 10 '20 at 18:53

2 Answers2

1

I have several programs running at work. These all uses Access databases (accdb) and Excel workbooks (xlsx). There is a mix of W7 and W10 out there and the programs are working on all of them. However, on both OS machines this has to be installed:

Microsoft Access Database Engine 2010 Redistributable, https://www.microsoft.com/en-us/download/details.aspx?id=13255

I implemented a check of whats installed on the users computers. It just logs to the inifile if the ACEOLEDB.DLL exists and where to be found. Then I check my log file for which machine/user that returns an error. This is what i found: On W10 computers this is definitely working with the above mentioned install:

AceOleDbAlt1_NOT_EXISTING!=C:\Program Files (x86)\Common Files\microsoft shared\OFFICE12\ACEOLEDB.DLL

AceOleDbAlt2_EXISTS=C:\Program Files (x86)\Microsoft Office\root\VFS\ProgramFilesCommonX86\Microsoft Shared\OFFICE16\ACEOLEDB.DLL

AceOleDbAlt3_EXISTS=C:\Program Files (x86)\Common Files\microsoft Shared\OFFICE14\ACEOLEDB.DLL

On a W7 machine, this works:

AceOleDbAlt1_EXISTS=C:\Program Files (x86)\Common Files\microsoft shared\OFFICE12\ACEOLEDB.DLL

AceOleDbAlt2_EXISTS=C:\Program Files (x86)\Microsoft Office\root\VFS\ProgramFilesCommonX86\Microsoft Shared\OFFICE16\ACEOLEDB.DLL

AceOleDbAlt3_NOT_EXISTING!=C:\Program Files (x86)\Common Files\microsoft Shared\OFFICE14\ACEOLEDB.DLL

So, it may not answer your question, but i hope it gives you an idea of what helps.

NanoBot
  • 11
  • 1
0

Download and run this test access connection application:

https://1drv.ms/u/s!Avrwal_LV4qxhpdBSWWSP5Ivv38AZw?e=BzIAhE

There is a x32 bit version, and a x64 bit version. It will let you browse to any accdb file, and open the file. There is no install, and it is a "tiny" exec file (about 30k - super small).

The screen it has looks like this: enter image description here

So run the exe in the above zip file. The x32 version, or x64 version displays what bit size it is running as. You can simple select the database, and then hit open. If you have the ACE engine installed correctly, then it will work.

Albert D. Kallal
  • 42,205
  • 3
  • 34
  • 51
  • when i press on the button "Open above Database file" i get the following error: **Can't open database file. Error msg File could not be locked. Err number = 5** – NiSu Oct 12 '20 at 15:07
  • Ok, and at least you can try/use both the x32 bit version, and that of the x64 bit version. We assume the x64 bit version works? You could try the read only radio button. What this means is that the folder where the accdDB file does not allow the user to create the ldb locking file. And it could be locked due to stray code that ran/is running from all your failed testing. I would consider a re-boot, or make a copy of a the accDB file to a different location for the above access "tester" utility. I suppose it also possible that the accDB file is bad or damaged. – Albert D. Kallal Oct 12 '20 at 17:47