I am facing wired problem but so far common in ASP.NET web page. When I run through localhost then it successfuly import data from excel file. But after deploying in a windows server 2012 in IIS then it does not work. All other data come nicely such as all
query and data access is fine. But the import does not work.
I have google this problem but their solution is to install Microsoft Access Database Engine 2010 Redistributable. I have installed this and restart but not working. I can not find the problem. Please help me to solve this problem.
I have installed MS Office 2013 andWIndows server 2012 iin my machine. Below I have past my codes.
Problem is that you have hidden any information about exceptions in a try-catch block and replaced it with your own error message, which won't always be accurate.
There are two versions of the 2010 engine. One is 32 bit and the other is 64 bit. If you have installed the 32 bit version, you need to enable 32 bit applications for your application pool.
I got the error. I have searched for this and got the recommended solution. But Fail. I have installed Office 2013 64bit and AccessDatabaseEngine 2010 64 bit and windows server 2008 64 bit. But still same error. The 'Microsoft.Jet.OLEDB.4.0' provider
is not registered on the local machine.
Please help me .thanks.
Error:
Error:System.InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper&
datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo,
DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection
owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection,
DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open()
at Import.Import_To_Grid(String FilePath, String Extension) in e:\ROSC II\ROSC\ROSC Soft\LGED-Attendance\Import.aspx.cs:line 130
I have used for two types of Excel version. Most of the time I will be using Excel version 97-03 Old version. Extension is .xls. But still it shows the Error--The
'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine
Member
1 Points
5 Posts
Can not import excel data after deploying ASP.NET website
Nov 30, 2016 11:01 AM|souidentities|LINK
Hi
I am facing wired problem but so far common in ASP.NET web page. When I run through localhost then it successfuly import data from excel file. But after deploying in a windows server 2012 in IIS then it does not work. All other data come nicely such as all query and data access is fine. But the import does not work.
I have google this problem but their solution is to install Microsoft Access Database Engine 2010 Redistributable. I have installed this and restart but not working. I can not find the problem. Please help me to solve this problem.
I have installed MS Office 2013 andWIndows server 2012 iin my machine. Below I have past my codes.
Thanks in advance
All-Star
194881 Points
28101 Posts
Moderator
Re: Can not import excel data after deploying ASP.NET website
Nov 30, 2016 11:06 AM|Mikesdotnetting|LINK
Problem is that you have hidden any information about exceptions in a try-catch block and replaced it with your own error message, which won't always be accurate.
There are two versions of the 2010 engine. One is 32 bit and the other is 64 bit. If you have installed the 32 bit version, you need to enable 32 bit applications for your application pool.
http://www.mikesdotnetting.com/article/280/solved-the-microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-machine
Member
1 Points
5 Posts
Re: Can not import excel data after deploying ASP.NET website
Dec 04, 2016 06:32 AM|souidentities|LINK
I got the error. I have searched for this and got the recommended solution. But Fail. I have installed Office 2013 64bit and AccessDatabaseEngine 2010 64 bit and windows server 2008 64 bit. But still same error. The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
Please help me .thanks.
Error:
Error:System.InvalidOperationException: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at Import.Import_To_Grid(String FilePath, String Extension) in e:\ROSC II\ROSC\ROSC Soft\LGED-Attendance\Import.aspx.cs:line 130
My code is below
All-Star
194881 Points
28101 Posts
Moderator
Re: Can not import excel data after deploying ASP.NET website
Dec 05, 2016 07:28 AM|Mikesdotnetting|LINK
Your connection string is trying to use the Jet provider. You should change that to the ACE provider:
Provider=Microsoft.Ace.Oledb.12.0;Data Source=...
Member
1 Points
5 Posts
Re: Can not import excel data after deploying ASP.NET website
Dec 06, 2016 05:20 AM|souidentities|LINK
I have used for two types of Excel version. Most of the time I will be using Excel version 97-03 Old version. Extension is .xls. But still it shows the Error--The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine
My web.config page is below
All-Star
194881 Points
28101 Posts
Moderator
Re: Can not import excel data after deploying ASP.NET website
Dec 06, 2016 07:34 AM|Mikesdotnetting|LINK
Member
1 Points
5 Posts
Re: Can not import excel data after deploying ASP.NET website
Dec 08, 2016 04:17 AM|souidentities|LINK
Thanks Mikesdotnet. It works.
But I also needed to change the IIS App pool setting to allow 32 bit excel files.
All-Star
194881 Points
28101 Posts
Moderator
Re: Can not import excel data after deploying ASP.NET website
Dec 08, 2016 07:35 AM|Mikesdotnetting|LINK