File upload

 

 

Microsoft.Jet.OLEDB.4.0 provider is not registered on the local machine

Problem: Installing RadControls on a 64-bit machine and running the examples that use Access as its database may cause the following error The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine, even if you have the Microsoft.Jet.OLEDB.4.0 provider installed. This results in OnePlan\OneForecast not allowing upload of files, giving the following error in the logs:

Forecast

02-03-2018 11:28:44.071 E 34 Error in importFromFile(q7Spkx60sxDvQ4mi4xpbmzh3CmMaD9.xls).System.InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
02-03-2018 11:28:44.071 E 34 at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
02-03-2018 11:28:44.071 E 34 at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
02-03-2018 11:28:44.071 E 34 at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
02-03-2018 11:28:44.071 E 34 at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
02-03-2018 11:28:44.071 E 34 at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
02-03-2018 11:28:44.071 E 34 at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
02-03-2018 11:28:44.071 E 34 at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
02-03-2018 11:28:44.071 E 34 at System.Data.OleDb.OleDbConnection.Open()
02-03-2018 11:28:44.071 E 34 at Collab.OneWorkForce.Forecast.GetFromFile.importFromFile(String filename, String serviceFullName, Boolean isAutomaticProcess)

Solution: The problem stems from the fact that the MS Jet engine (the DB engine behind Microsoft Access) does not have a 64-bit port. Running on a 64-bit machine will default to a 64-bit web application pool and it will not be able to find the 32-bit version of the Jet engine component.

The solution is to configure the application pool and enable 32-bit application support. For IIS 7, running on Windows Vista, you can do this from the application pool's advanced settings dialog:
excelupload.png

Note: The same can be made for Windows 2003 and IIS 6, by following the instructions in this Microsoft KB article.

 

 

Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine

Problem: OneForecast excell import not working due to missing dependencies giving the following error in the log.

Forecast:

OneForecast_or_OnePlan_excell_import_not_working_due_to__Microsoft.ACE.OLEDB.12.0_.png

Solution:

To upload Plans and Forecasts in the WorkForce GUI from a Microsoft Excel spreadsheet, the following steps must be taken into consideration:

  • Make sure there is a folder "TemporaryFiles" in the root directory, create it otherwise.
  • Microsoft Office must be installed in the machine where the site is running.
  • Install Microsoft Access Database Engine 2010 Redistributable
  • If you have Microsoft Office in 32-Bits (x86) the Internet Information Services (ISS) must be allowed to run applications in 32-Bits. Go to the ISS Pool Application and in the pool associated to your site go to Advanced Settings and in General set Enable 32-Bit Applications to True.