Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# ASP.NET MVC Basics Modeling and Presenting Data Improving Our View Layout

Image is not showing up

The Spider Man image is not showing up. Here is my error message. I do have the images folder and it has the spiderman image

HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Most likely causes: The directory or file specified does not exist on the Web server. The URL contains a typographical error. A custom filter or module, such as URLScan, restricts access to the file.

Things you can try: Create the content on the Web server. Review the browser URL. Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click here.

Detailed Error Information: Module IIS Web Core Notification MapRequestHandler Handler StaticFile Error Code 0x80070002 Requested URL http://localhost:80/Images/the-amazing-spider-man-700.jpg Physical Path C:\inetpub\wwwroot\Images\the-amazing-spider-man-700.jpg Logon Method Anonymous Logon User Anonymous

More Information: This error means that the file or directory does not exist on the server. Create the file or directory and try the request again. View more information ยป

There needs to be two extra dots before the images. Then the spiderman image will show up.

Here is the code

<p>
@model ComicBookGallery.Models.ComicBook

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = Model.DisplayText;
}


<h2>@Model.DisplayText</h2>

<div class="row">
    <div class="col-md-6">
        <div class="well">
            <h5><label>Series Title:</label> @Model.SeriesTitle</h5>
            <h5><label>Issue #:</label> @Model.IssueNumber</h5>
            <h5><label>Favorite:</label> @(Model.Favorite ? "Yes" : "No")</h5>
            @if (Model.Artists.Length > 0)
            {
                <h5>Artists: </h5>
                        <div>
                            <ul>
                                @foreach (var artist in Model.Artists)
                                {
                                    <li>@artist.Role: @artist.Name</li>
                                }
                            </ul>
                        </div>
            }
        </div>
        <h5>Description: </h5>
        <div>@Html.Raw(Model.DescriptionHtml)</div>
    </div>
    <div class="col-md-6">
        <img src="../Images/@Model.CoverImageFileName"
             alt="@Model.DisplayText" class="img-responsive" />
    </div>
</div>
</p>