Why does IIS return empty answers?

I just published an AngularJS / WebAPI project using file system publishing in a local IIS application and I can open the website in my browser. Unfortunately, no resources, such as images, css, etc., can be downloaded. When I try to get to any file located in a subfolder, I still get HTTP 200 from the server, but the body is empty. I remember that I had this problem several years ago, but I can’t remember why this is happening.

Request

GET http://localhost/Content/images/common/logotype.png HTTP/1.1
Host: XX.XXX.XX.XXX
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8,sv;q=0.6

Answer

HTTP/1.1 200 OK
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET
Date: Tue, 25 Aug 2015 07:56:12 GMT
Content-Length: 0

As you can see, there is no body at all, but the image exists in the folder, and I can open it from the file system. I would suggest that if it was a privilege problem, the server will return 403 or a similar error, rather than 200 OK?

+5
1

Facepalm

, : . " " IIS " HTTP".

Add Feature

+8

All Articles