locked
Exception got RRS feed

  • Question

  • User364663285 posted

    Hi,
    I've set up Access on server. Why is it still having issue below?

    [InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.]



    Thursday, April 29, 2021 4:58 AM

Answers

  • User753101303 posted

    See https://www.winservermart.com/HowTo/How_To_Switch_32bit_and_64bit_mode_in_IIS7.aspx to enable 32 bit.

    I would do this the other way roound ie I would install what I need depending on what I want rather than to change settings dependng on what is currently installled espectially if the 32 bit version was not installed on purpose.

    Else for ASP.NET .4.x, it should be "v4.0" and "Integrated". Note also that of the same app ppol is used for multiple apps it will apply to all applications using this application pool.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 5, 2021 7:57 AM

All replies

  • User753101303 posted

    Hi,

    You have a  32 bit and a 64 bit version and you have to install the one that is matching your app (more likely the other one). 

    If in doubt you can show https://docs.microsoft.com/en-us/dotnet/api/system.environment.is64bitprocess?view=net-5.0 from your app on the target machine to make 100% sure if it runs as a 32 bit or a 64 bit app.

    Thursday, April 29, 2021 7:08 AM
  • User-1716253493 posted

    Enable 32bit option in app pool

    Thursday, April 29, 2021 4:54 PM
  • User1535942433 posted

    Hi wmec,

    For version 12.0 you need to install MDAC 2010 from here.

    This has to be done on the server where you publish your application. You need to install the x86 version if the target machine is 32 bit or the x64 version if the target machine is 64 bit and your application is built with configuration Any CPU.

    If you don't know what's version,you could do this:

    1.Click Start > Settings > System > click About from the bottom of the left-hand menu.

    2.You'll now see Edition, Version, and OS Build information.

    Best regards,

    Yijing Sun

    Friday, April 30, 2021 1:49 AM
  • User364663285 posted

    Oned,

    Which option do you mean below?

    https://1drv.ms/u/s!Ai8CrEskdewXvmdeB-dEY-p1yrX_?e=vNTsfL

    Yij,

    Server is Win 2016, and which option within "Start > Settings > System", to adjust?

    Friday, April 30, 2021 11:28 PM
  • User753101303 posted

    Nope. Starting from the Windows Start menu, it should show OS details. Windows 2016 is a 64 bit only OS and by default your app should run as a 64 bit app.. If in doubt System.Environment.Is64BitProcess shows if the app process runs in 64 bit or 32 bit mode and:
    - if true you need to install AccessDatabaseEngine_X64.exe
    - if false you need to install AccessDatabaseEngine.exe

    More likely you installed the 32 bit version or you installed the 64 bit version but for some reason your app currently runs in 32 bit mode. Your app and the DLL it uses should match (ie both should be 32 bit or both should be 64 bit).

    Sunday, May 2, 2021 11:46 AM
  • User364663285 posted

    Hi,
    Where to locate variable System.Environment.Is64BitProcess?

    Sunday, May 2, 2021 2:10 PM
  • User753101303 posted

    Seems you are using Web Forms so I meant just use something such as :

    myLabel.Text=System.Environment.Is64BitProcess.ToString();

    with 

    <asp:Label runat="server" ID="myLabel"/> so that your app can show this value. Tjhen you'll be 100% sure  if yoiur app runs in 64 bit or 32 bit mode

    Or you installed which exe version? More likely you just have to onstall the other one..

    Sunday, May 2, 2021 2:30 PM
  • User-1716253493 posted

    Go to Advanced Setting

    The screenshoot is basic setting or double click, see right side for advanced setting

    Oned,

    Which option do you mean below?

    https://1drv.ms/u/s!Ai8CrEskdewXvmdeB-dEY-p1yrX_?e=vNTsfL

    Sunday, May 2, 2021 4:45 PM
  • User364663285 posted

    Oned,

    Which option should be selected (or adjusted) below?

    https://1drv.ms/u/s!Ai8CrEskdewXvn21VrLMK7LDCTN_?e=ea0hg4

    Wednesday, May 5, 2021 3:24 AM
  • User753101303 posted

    See https://www.winservermart.com/HowTo/How_To_Switch_32bit_and_64bit_mode_in_IIS7.aspx to enable 32 bit.

    I would do this the other way roound ie I would install what I need depending on what I want rather than to change settings dependng on what is currently installled espectially if the 32 bit version was not installed on purpose.

    Else for ASP.NET .4.x, it should be "v4.0" and "Integrated". Note also that of the same app ppol is used for multiple apps it will apply to all applications using this application pool.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 5, 2021 7:57 AM
  • User364663285 posted

    Hi,
    I've put True to Enable 32-bit Application, in Application Pools. But it is still the same issue below.

    [InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.]
       System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) +258
       System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) +497
       System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +100
       System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) +57
       System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +1142
       System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +312
       System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +23
       System.Data.OleDb.OleDbConnection.Open() +52

    Wednesday, May 19, 2021 8:20 AM
  • User753101303 posted

    Could you be explicit about what you installed exactly? I would expect something such as https://www.microsoft.com/en-us/download/details.aspx?id=54920 and you have AccessDatabaseEngine.exe for a 32 bit app and AccessDatabaseEngine_X64.exe for a 64 bit app.

    Also you could try to use https://docs.microsoft.com/en-us/dotnet/api/system.data.oledb.oledbenumerator.getrootenumerator?view=dotnet-plat-ext-5.0 on a test page to see which ole db providers are found.

    If you are sure you installed the correct version and you never restarted the server since then, it mgiht worth a try to try a reboot ?

    Edit:  BTW if this your main db store, you may have better optiions such as SQL Server Express...

    Wednesday, May 19, 2021 9:05 AM