Bit of a trouble here. I am trying solution for days and days but not able to solve this one.
I am trying to upload and read an excel file. To give you some back ground. I have developed application to be used on web server having windows server 2008 64 bit. I am using office 2010. The provider path i am using is as this
string
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=" + excelFilePath +
";"
+
@"Extended
Properties=""Excel 8.0;IMEX=1;""";
This works on my 64 bit DEV machine, but fails when i dploy the same on production. I get the error as below
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.OleDb.OleDbException (0x80004005): Unspecified error
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.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
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& connection)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(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 Edenbrook.Hindsite.BL.ExcelQuestionReader.ExcelQuestionReaderFromFile(String excelFilePath) in D:\Vs_2010_San\Trunk\Hindsite\Source\Edenbrook\Hindsite\BL\ExcelQuestionReader.cs:line 45
<div class="indent">Document settings\ServerName\ASPNET\Local settings\Temp</div> <div class="indent"> </div> <div class="indent"> </div> <div class="indent">Also, tried to run the soln as x86 on 64 bit Os and enabled run 32 application mode in the
application pool.</div> <div class="indent"> </div> <div class="indent">Can anyone suggest any alternatives ?</div>
Here could not find the path as Document settings\ServerName\ASPNET\Local settings\Temp
As for your problem, you could refer to the following link, you will see Kevin Spencer’s reply as below.
Kevin Spencer:
“The folder (Document settings\ServerName\ASPNET\Local settings\Temp) belongs to the user account under which ASP.Net is running. Look for a folder for THAT user. And don't expect to find it on your machine unless you have an IIS web server set up and ASP.Net running on a web site on your local machine.”
For more information, please check the below link.
None
0 Points
13 Posts
OLEdb exception on uploading an excel file
Sep 29, 2014 12:27 PM|sandywinlive|LINK
Team,
Bit of a trouble here. I am trying solution for days and days but not able to solve this one.
I am trying to upload and read an excel file. To give you some back ground. I have developed application to be used on web server having windows server 2008 64 bit. I am using office 2010. The provider path i am using is as this
string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + excelFilePath + ";"
+ @"Extended Properties=""Excel 8.0;IMEX=1;""";
This works on my 64 bit DEV machine, but fails when i dploy the same on production. I get the error as below
2014-09-29 15:16:58,474 [6] ERROR Unhandled [(null)] - UNHANDLED EXCEPTION
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.OleDb.OleDbException (0x80004005): Unspecified error
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.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
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& connection)
at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(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 Edenbrook.Hindsite.BL.ExcelQuestionReader.ExcelQuestionReaderFromFile(String excelFilePath) in D:\Vs_2010_San\Trunk\Hindsite\Source\Edenbrook\Hindsite\BL\ExcelQuestionReader.cs:line 45
Solutions tried
http://support2.microsoft.com/kb/825738
Here could not find the path as
<div class="indent">Document settings\ServerName\ASPNET\Local settings\Temp</div> <div class="indent"> </div> <div class="indent"> </div> <div class="indent">Also, tried to run the soln as x86 on 64 bit Os and enabled run 32 application mode in the application pool.</div> <div class="indent"> </div> <div class="indent">Can anyone suggest any alternatives ?</div>asp.net oledb excel
All-Star
38056 Points
5156 Posts
Microsoft
Re: OLEdb exception on uploading an excel file
Sep 30, 2014 02:27 AM|Fei Han - MSFT|LINK
Hi sandywinlive,
Thanks for your post.
As for your problem, you could refer to the following link, you will see Kevin Spencer’s reply as below.
For more information, please check the below link.
Hope it will be helpful to you.
Best Regards,
Fei Han
asp.net oledb excel
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue.