title: File upload control not working while running through IIS
body: <p>This is my coding for the upload to eport to excel...it is working fine when i run </p>
  
  <p>through local in case while running through IIS it is not working.....</p>
  
  <p>This is my code....</p>
  
  <pre><code>protected void btnImport_Click(object sender, EventArgs e)
  {
      if (RevenueDumpFileUpload.HasFile)
      {
          string strFilePathOnServer = ConfigurationManager.AppSettings["RevenueDumpFileLocation"];
          String sConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath(strFilePathOnServer) + RevenueDumpFileUpload.FileName + ";Extended Properties=Excel 8.0;";
         // RevenueDumpFileUpload.PostedFile.SaveAs(Server.MapPath(strFilePathOnServer) + RevenueDumpFileUpload.FileName);
          OleDbConnection Exlcon = new OleDbConnection(sConnectionString);
          try
          {
              Exlcon.Open();
          }
          catch
          {
              return;
          }
          OleDbCommand objCmdSelect = new OleDbCommand("SELECT * FROM [Sheet1$]", Exlcon);
          OleDbDataAdapter objAdapter1 = new OleDbDataAdapter();
          objAdapter1.SelectCommand = objCmdSelect;
          objAdapter1.Fill(objDataset1, "XLData");
          methodtosave();
      }
  }
  </code></pre>
  
  <p>How to solve this?</p>