title: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine
body: <p>I am getting below error when after uploading my asp.net application on window server 2008 R2</p>
  
  <blockquote>
    <p>The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local
    machine.</p>
  </blockquote>
  
  <p>I have used oleDbConnection class as below to read excel file</p>
  
  <pre><code>OleDbConnection excelConn = null;
  
              try
              {
                  if (System.IO.Path.GetExtension(fileName) == ".xlsx")
                  {
  
                      excelConn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileName + "; Extended Properties='Excel 8.0;HDR=Yes;IMEX=1'");
                  }
                  else
                  {
                      excelConn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileName + "; Extended Properties='Excel 8.0;HDR=Yes;IMEX=1'");
                  }
  
                  excelConn.Open();
                  DataTable dt = new DataTable();
  
                  dt = excelConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
  </code></pre>
  
  <p>After searching google i found that i need to install <strong><a href="http://www.microsoft.com/en-us/download/details.aspx?id=23734" rel="nofollow">2007 Office System Driver</a></strong>
  so i have also tried that however i am getting same error.</p>