1
<telerik:RadUpload ID="fuExcelUpload" Skin="Windows7" runat="server"
    OverwriteExistingFiles="True" Width="100%" ControlObjectsVisibility="None"
    MaxFileInputsCount="1">
</telerik:RadUpload>

Above is the code for the RadUpload control

foreach (UploadedFile file in fuExcelUpload.UploadedFiles)
{
        string fileName = Server.MapPath("~/App_Data/" + file.GetName());
        file.SaveAs(fileName, true);
        dtExcel = new RelatedParty().SelectExcelData("OLEDB12", fileName, "[sheet1$]");
        SqlXml ReferenceNumbers = PassXML(dtUpload);
}

Above is the code to upload the Excel file. This code works perfectly on the development machine, and in the test environment, when deployed in the IIS server.

This problem occurs only when the project is published in the UAT testing server in the client site. Is it a problem with the App_Data folder?

It is much appreciated if you can suggest the reason for the issue and resolution! Also, no error occurs, just the file won't get read. The file is created in the App_Data folder also.

halfer
  • 19,824
  • 17
  • 99
  • 186

0 Answers0