Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Excel reading in asp.net

Posted on 2013-02-07
9
Medium Priority
?
384 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 36

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 36

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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

972 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