Sunday, March 24, 2013

How to solve Microsoft.Jet.OLEDB.4.0 and Microsoft.ACE.OLEDB.12.0 problem IIS 7, IIS 8


 
OLE DB is a set of COM-based interfaces that expose data from a variety of sources.

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

Scenario: You are a web server administrator and you got a web site or an application given by developer which is working fine on the developer machine now you have hosted the web site on the Web Server IIS 7 or IIS 8 and its working fine but a little while later a developer call to you and says he is unable to upload the excel files.

See the comprehensive Video Tutorial on YouTube to solve this problem: https://www.youtube.com/watch?v=m4BwtCjs3z8

Error 1: Access to the path 'C:\inetpub\wwwroot\OLEDB-TEST-SITE\UploadedExcel\24032013_013545.xls' is denied.

This error comes because the folder where the file is uploaded doesn't have a write permission to solve this give the IIS_IUSRS write permission on the folder where the files are uploaded. 







Error 2:
When uploading .xls file your getting this error ( The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.





To solve this problem you have to download and install "2007 Office System Driver: Data Connectivity Components" on the web server the link is given at the bottom to this blog.







Also you have to "Enable 32-bit Applications to True" in IIS Application Pool for the web application if you want to upload the .xls files.


See the comprehensive Video Tutorial on YouTube to solve this problem: https://www.youtube.com/watch?v=m4BwtCjs3z8

  









Error 3:
When uploading .xlsx file your getting this error ( The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. )



To solve this problem you have to download and install "Microsoft Access Database Engine 2010" on the web server the link is given at the bottom to this blog. 







Link to Download:-  

Microsoft Access Database Engine 2010
http://www.microsoft.com/en-us/download/details.aspx?id=13255


2007 Office System Driver: Data Connectivity Components
http://www.microsoft.com/en-us/download/details.aspx?id=23734

Also you can download the test web application to test the OLEDB provider is registered on the local machine or not.
https://docs.google.com/file/d/0B8J5QeSXwQfbVlFiX3YxZXZyS3M/edit?usp=sharing


See the comprehensive Video Tutorial on YouTube to solve this problem: https://www.youtube.com/watch?v=m4BwtCjs3z8



 
 


HI there, ~(。◕‿◠。)~
= If You Like This Video, Give It a Thumbs Up :)
= Subscribe to receive email updates when we post new videos ;) ,
= Share it with your technical IT friends "_" ,
= if your facing? any technical problem or have any suggestion post your comment here or catch me  on google+ or Gtalk :D!




 

29 comments:

  1. Thanks, Error #2 fixed it for me!

    ReplyDelete
    Replies
    1. Your welcome Mexner, Good to this solved your problem. See Ya :)

      Delete
  2. Thanx you r the man :)

    ReplyDelete
  3. when i download Microsoft Access Database Engine 2010 it requires for me to delete certain which then don't let me use any of other other Microsoft products.

    can u help

    ReplyDelete
    Replies
    1. hi what is the error you're getting please provide a screen short.

      Delete
    2. The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

      Delete
    3. you have to install the Microsoft Access Database Engine 2010 other wise it not work

      Delete
  4. Hi Sachin,
    I was using OLEDB.jet 4.0 in my local machine.It worked for me .Local system had Jet folder in regedit.. But whereas the same code didnt work in the server.. In server,either jet or ace provider is not available. Error occurs while opening the connection, conn.open.... but in the inner exeception i get an index error.. please help me.. Urgent

    ReplyDelete
  5. Hi there
    I am getting this error too..
    i have developed C#.net application connected with MS Access 2010
    I works fine on my local machine ..but after deploying it on the remote server, i have got same error again
    The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.

    Please help me out ...

    ReplyDelete
  6. Thanks... it works :)

    ReplyDelete
  7. Hi,
    I just installed the Access Database Engine 2010 but still get the same Microsoft.Jet.OLEDB.4.0...error when I run the app. The app is already compiled so changing target compilation is not an option for me.

    ReplyDelete
  8. For asp.net 2.0 it's working fine, but if I use same code in asp.net 4.0 web forms still same error both Microsoft.Jet.OLEDB.4.0 and Microsoft.ACE.OLEDB.12.0 not registered in the local machine, any idea? (both solution in same machine windows 7 - iis 7.5- asp.net 4.0)

    ReplyDelete
  9. Thanks. It has been of great help.

    ReplyDelete
  10. Hi I am getting this error message when trying to browse your app:

    HTTP Error 404.17 - Not Found
    The requested content appears to be script and will not be served by the static file handler.

    ANYONE can help me?

    ReplyDelete
  11. In order to avoid installing and enabling 32bit Data Connectivity Components on 64bit web server, just install 64bit Microsoft Access Database Engine 2010 and change the connection string from "Microsoft.Jet.OLEDB.4.0" to "Microsoft.ACE.OLEDB.12.0" and everything should work just fine, since it is backwards compatible.

    ReplyDelete
    Replies
    1. You are amazing !!! I was working on this for hours and you just solved my problem only with this little post :-) Thanks.

      Delete
  12. hello. recently i had ACCIDENTALLY install the 2010 version for 32 bit. How could I delete that file? I already delete the program on the controlpanel on my windows 8 but still when im installing the 64 bit verdion of 2010 the message is i have to delete the 32 bit version. pls help me sir. thanks

    ReplyDelete
  13. Hello sir i am using your code, it working fine in my local system bu same code is not working on GODADDY server , this is my URL, http://test.par-ken.com/

    ReplyDelete
  14. Thank you so much this code is very use full for me

    ReplyDelete
  15. Thanks , it Helps for me. have to set Enabled 32 bit to True for Application pool which is assigned for application.

    ReplyDelete
  16. Thank you for sharing. This has helped to solve my problem. I advise everyone to fix the number 2. If this does not help, try replacing the dll filehttp://fix4dll.com/msvcp110_dll. It always helps. Good luck.

    ReplyDelete
  17. AppServ как быть на этом сервере ? можно подключить

    ReplyDelete
  18. I have read your blog its very attractive and impressive. I like it your blog.

    Dot Net Training in Chennai Dot Net Training in Chennai .Net Online Training .Net Online Training Dot Net Training in Chennai

    Dot Net Online Training .Net Online Training ASP.NET Online Training ASP.NET Online Training

    ReplyDelete
  19. Hi,
    Can we have both Microsoft.Jet.OleDb and Microsoft.Ace.OleDb
    in the same system.

    ReplyDelete