I store IFormfile in static class and convert it into memory stream but it shows this error:
System.ObjectDisposedException: 'Cannot access a disposed object. Object name: 'FileBufferingReadStream'.'
using (MemoryStream stream = new MemoryStream())
{
IFormFile tempFile = ExcelDataValidation.DLExcelFile;
tempFile.CopyTo(stream); //Error shows here
}