6/25/2018
Posted by 
Asp.net Mvc File Download Example Rating: 8,6/10 7628votes

@ManafAbuRous, if you read the code closely you will see it actually converts the virtual path to physical path ( Server.MapPath(this.VirtualPath)) so consuming this directly without change is a tad naive. You should produce an alternate that accepts PhysicalPath given that's what is eventually required and is what you are storing. This would be much safer as you have made an assumption that the physical path and relative path would be the same (excluding the root). Data files are often stored is App_Data. This is not accessible as a relative path. – Sep 1 '13 at 11:13.

In this article we will see how to download files in MVC. File Download Sample in MVC: Day 40. Learn ASP. Install Itunes Linux Debian Download on this page. NET MVC; Learn ASP.NET Core.

Give More Feedback