Solved

Excel reading in asp.net

Posted on 2013-02-07
9
356 Views
Last Modified: 2013-02-14
Hello Experts!

I have attached the code but I am finding the following issue when I host this on the IIS 7 on the Windows Server Standard FE Service Pack 2

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

The problem is coming because of the following:
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileLocation + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=2\"";

I did enable 32 bit true of the application pool assigned but then it gets to the  following problem:

The requested page cannot be accessed because the related configuration data for the page is invalid.

Thanks
meetDinesh
Test.zip
0
Comment
Question by:Dinesh Kumar
  • 6
  • 2
9 Comments
 
LVL 35

Expert Comment

by:Miguel Oz
ID: 38866672
What exact OS version are you using?
You may need to reinstall Microsoft.Jet.OLEDB.4.0 driver,  check:
http://stackoverflow.com/questions/1991643/microsoft-jet-oledb-4-0-provider-is-not-registered-on-the-local-machine

Also you need to recompile your site as 32 bit (x86) application.
0
 

Author Comment

by:Dinesh Kumar
ID: 38866886
OS Version: Windows Server Standard FE Service Pack 2

I tried to install http://www.microsoft.com/en-us/download/details.aspx?id=13255

but it says  I need to uninstall 32 drivers first from the Server, I don't know how to uninstall that that.
0
 
LVL 35

Expert Comment

by:Miguel Oz
ID: 38870071
What it means is that driver is actually installed, thus no need to install anything.
If that is the case you should recompile your site as 32 bit (x86) application and configure IIS app pool site to run 32 bit apps:
- Open IIS
- Change the appPool on Advanced Settings to true to enable to 32-bit application.

If the above does not solve and you still has the requested page access error message, you may have permission issues or your web.config files is corrupted, check:
 http://stackoverflow.com/questions/9216158/the-requested-page-cannot-be-accessed-because-the-related-configuration-data-for
http://social.msdn.microsoft.com/Forums/eu/wcf/thread/3bccf307-3ed2-49e5-aa83-e18abcb3385a
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:Dinesh Kumar
ID: 38871064
If I do enable to 32-bit application:

then the problem becomes the following:

http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Microsoft_IIS/Q_28022154.html
0
 

Author Comment

by:Dinesh Kumar
ID: 38871066
and if do enable 32 bit application as false then:

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

Author Comment

by:Dinesh Kumar
ID: 38871182
I tried installing 64 bit on the 64 machine i.e on the Server and I found the attached error.
error-1-.png
0
 

Accepted Solution

by:
Dinesh Kumar earned 0 total points
ID: 38871631
I resolved the following error
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.

by installing the AccessDatabaseEngine_x64.exe on http://www.microsoft.com/en-in/download/details.aspx?id=13255

but because the server is 64 bit so I have to uninstall the 32 bit based Office 2007 from the Server.

Moreover I used only Microsoft.ACE.OLEDB.12.0 (for 64 bit)  instead of Jet.OleDB.4.0 (32 bit)

Yes we can force Jet OleDB to run on 64 bit by enabling 32 bit true forcefully but it was  not required as I used ACE.OLEDB.12.0
0
 

Author Closing Comment

by:Dinesh Kumar
ID: 38888279
I myself resolved after a long time :-(
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question