Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
For anyone developing in Visual Studio the answer is to uncheck Prefer 32-bit in the project properties compile page.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Connection to ACCESS database fails with exception:
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
For anyone developing in Visual Studio the answer is to uncheck Prefer 32-bit in the project properties compile page.
Problem
ACCESS database connection failure on an app in Azure Web Service:
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine
The 'Microsoft.Jet.Ole8db.4.0' provider is not registered on the local machine.
Background
Microsoft recognizes that the error is by design as we do not install the Microsoft.Ace.we.12.0' driver. The Microsoft.Ace drivers are not supported in server side environments and as of now there is no plans to add these to the Azure Web Sites.
My working solution
The solution is complex, but it is working at least.
Step 1) Separate connection strings for the 64-bit source (on PC) and 32-bit target (Azure)
Connection String for 64-bit environment:
"Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source=" & sMdb & ";" & "Jet OLEDB:Database Password=" & sPass & ";" & "Persist Security Info=True;"
Connection String for 32-bit target environment:
"Provider=Microsoft.Jet.Ole8db.4.0;" & "Data Source=" & sMdb & ";" & "Jet OLEDB:Database Password=" & sPass & ";" & "Persist Security Info=True;"
Step 2) Adjust Registry Editor
In the search box on the taskbar, type “regedit” to open Registry Editor and adjust
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
Add:
DWORD ForceLog set value to 1
DWORD LogFailures set value to 1
DWORD LogResourceBinds set value to 1
DWORD EnableLog set value to 1
String LogPath set value to folder for logs (e.g. C:\FusionLog)
(reference: https://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net)
Step 3) Switch settings when deploying to Azure
Change Project / Property / Compile / Target CPU to “x86”
Change Platform to "x86"
Change Enable 320Bit Applications to “True”
Step 4) Switch settings back to 64-bit development PC environment
Change Project / Property / Compile / Target CPU to “Any CPU”
Change Platform to "Any CPU"
Change Enable 320Bit Applications to “False”
The Wayback Machine and Internet Archive FOR THE WIN!
This was sourced from chocolatey, but is available for direct download from the following links:
Chocolately package for reference: https://community.chocolatey.org/packages/made2010#files
Cheers!
Apologies for facing issue on this! If you are receiving the following error on your Azure Web Site
'Microsoft.Ace.OLEDB.12.0' provider is not registered on the local machine
The error is by design as we do not install the Microsoft.Ace.we.12.0' driver.
The Microsoft.Ace drivers are not supported in server side environments and as of now there is no plans to add these to the Azure Web Sites.
Workaround-
This leaves the option of using the Jet Drivers which are installed, however these are only available in 32 bit versions so you will have to configure your site to run in 32 bit versions. The Microsoft OLE DB Provider for Jet and the Microsoft Access ODBC driver are available in 32-bit versions only: http://support.microsoft.com/kb/957570/en-us
This is also discussed here: Data Access Technologies Road Map http://msdn.microsoft.com/en-us/library/ms810810.aspx#bkmk_DepMDAC_WDACComps
Also, you could use Windows Containers to install these drivers.
Quickstart: Run a custom container on App Service - Azure App Service | Microsoft Learn
Further if you wish you may share your feedback on Azure Web App Uservoice -
All of the feedback, you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure. Additionally, users with a similar request can up-vote you post and add their comments.
Please let us know, if you have further query or issue remains.