somanath mishra

somanath mishra

  • NA
  • 13
  • 3.7k

FileResult method is not downloading file.

Aug 26 2016 4:13 AM
when i click from browser "Download button" it will download my log file which is present in App_Data. my code was
 
[HttpGet]
public FileResult LogsDownload()
{
return File("~//App_Data//log.txt","text/plain","log.txt");
}
 
and i am calling this method through ajax from view page.But it returning error that "Process cannot access this file because it is using by another process".
 plz help me.Thank you 
 

Answers (1)