Большое спасибо @StephenMuecke. Добавление ContentType к следующей функции решается.

становить значение HttpPostedFileBase ContentType во время выполнения?

    HttpPostedFileBase upl=null;
    string path="/exelFile/book1.xlsx";

    //-----Set Name Runtime 
    var Name="FileName.xlsx";
    //-----Set Type Runtime 
    var type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";         
    byte[] bytes =System.IO.File.ReadAllBytes(Server.MapPath(Path));
    upl = (HttpPostedFileBase)new MemoryPostedFile(bytes, Name);

    //=====>how set type
    upl.ContentType 
    //==============

Ответы на вопрос(0)

Ваш ответ на вопрос