Posts

Showing posts with the label images

How To Fix: 404 Error When Requesting Images Hosted on IIS Under a Frontend Website

Image
Hosting images on an IIS server seems to be pretty much a basic task.  I mean all you need is to create a virtual directory or even a website and just move the pictures to the physical path of this website and then you can access it through: server-hostname.com/virtual-directory/picture-name.jpg Well while this might be something that you can apply easily, following the same steps but instead of creating a new website you go for adding a virtual directory under an existing frontend website might yield the world famous 404 error . The Problem I was working on a project once where I needed to create an API that takes an image url as a parameter and downloads it on the same server where the UI of the application was hosted.  I will show you how to create such an API in an upcoming post but right now let's focus on creating a virtual path under your frontend website. After you open your IIS manager right click your frontend website click on Add Virtual Directory and select the phy...