Matthew Trip
Matthew Trip

Reputation: 370

ASP.Net Images Not Showing (403: Forbidden)

I have a list of urls. For example, https://i.nhentai.net/galleries/987560/1.jpg (SFW)

However, when I try to display the images in my View, some of the images sometimes load, but the majority do not load.

ExampleImage

When I paste the urls into my browser, they all work. But when I right-click a broken image and press "Open image in new tab", I receive an ngix 403 Forbidden error.

My View

@{
    ViewData["Title"] = "Books";
}
<h1>@ViewData["Title"]</h1>

<ul>
    @foreach (var bookUrl in (List<string>) ViewData["Urls"])
    {
        <img src="@bookUrl"/>
    }
</ul>

Upvotes: 0

Views: 434

Answers (1)

Yaniv Jacob Jacob
Yaniv Jacob Jacob

Reputation: 50

This has something to do with this specific site host. Try to link another image from different url and it should work.

Upvotes: 1

Related Questions