title: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine error message
body: <p>I don't get where i wrong.</p>
  
  <p>when i work with local machine program run successfully.
  but when i upload on server it will give an error like The <strong>'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine</strong></p>
  
  <pre><code>           protected void btnImport_Click(object sender, EventArgs e)
            {
        // try{
            string connectionstring = "";
            string filename = Path.GetFileName(FileUpload1.PostedFile.FileName);
          string fileextension = Path.GetExtension(FileUpload1.PostedFile.FileName);
          string filelocation = Server.MapPath("~/file/") + filename;
          FileUpload1.SaveAs(filelocation);
          if (fileextension == ".xlsx")
          {
              connectionstring = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filelocation + ";Extended Properties=\"Excel 12.0;HDR=YES;IMEX=2\"";
              OleDbConnection conn = new OleDbConnection(connectionstring);
              OleDbCommand cmd = new OleDbCommand();
              cmd.CommandType = System.Data.CommandType.Text;
              cmd.CommandText = "select * from [Sheet1$]";
              cmd.Connection = conn;
              OleDbDataAdapter oda = new OleDbDataAdapter(cmd);
              System.Data.DataTable dt = new System.Data.DataTable();
              oda.Fill(dt);
              grvExcelData.DataSource = dt;
              Session["TaskTable"] = dt;
              grvExcelData.DataBind();
          }
        // }catch(Exception ex){Response.Write(ex.Message);  }
      }
  </code></pre>
  
  <p>error image 
      <img src="https://i.stack.imgur.com/3KI27.png" alt="enter image description here"></p>