Show image saved in App_Data

I have 2 image files in my App_Data directory and I want to show them in my view as follows:

@foreach (var media in Model)
{
     <div class="col-lg-3 col-md-4 col-xs-6 thumb">
         <a class="thumbnail"><img src="@Url.Content("~/App_Data/uploads/" + @media.URL)" alt="image" /></a>
      </div>
}

When I check the link in the browser, I get the following:

<img src="/App_Data/uploads/Warnings.png" alt="image">

It says that he cannot find the image. How to set the correct link?

+4
source share
1 answer

App_Data "" .NET, IIS , -. , App_Data ( ).

iis.net:

, -, ASP.NET, IIS 7 ASP.NET ; Web.config, bin, App_Code .. URL- URL .

+10

All Articles