I have controller which return file and after download file (in debug mode), iis.exe exit with code -1.
This is my controller
public class DownloadController : Controller
    {
        // GET: Download
        public ActionResult Index()
        {
            return View();
        }
    public ActionResult DownloadFF()
    {
        var pathToTheFile = Server.MapPath("~/Content/materials/test.txt");
        return File(pathToTheFile, MimeMapping.GetMimeMapping(pathToTheFile), "text.txt");
    }
    public FilePathResult DownloadTestFPR()
    {
        var pathToTheFile = Server.MapPath("~/Content/materials/test.txt");
        return File(pathToTheFile, MimeMapping.GetMimeMapping(pathToTheFile), "text.txt");
    }
}
If I use DownloadFileFF or DownloadTestFPR I got same result.
The program '[11124] iisexpress.exe' has exited with code -1 (0xffffffff).
I don't know if it is normal behavior, but without debug mode, after download file my mvc app is still running.
Questions are:
maybe this info help, maybe not, I working under VisualStudio 2017 CE v15.9.14
User contributions licensed under CC BY-SA 3.0