Solved

Excel reading in asp.net

Posted on 2013-02-07
9
351 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:Dinesh Kumar
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:Dinesh Kumar
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I myself resolved after a long time :-(
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now