My web app(MVC4) is hosted on IIS 7.5, Windows 7 Ultimate with .net framework 4.0 and 4.5 installed. On hosting the application, the images are not rendered, giving me a 404 error
The content type is "Text/html" shouldn't it show as "image/jpeg or png"?
On giving the image path directly, the image is rendered, but not through css. The css is loading, as my layout is intact.
I have gone through many questions related to the same issue, have included
<modules runAllManagedModulesForAllRequests="true" />
checked for Static Content under IIS>WWW Services in control Panel, applied hotfixes (http://support.microsoft.com/kb/980368).. in vain.
My css code is as below,
body{background:url(images/bg.jpg);
image folder structure is
- ABC
- images (folder)
- bg.jpg
- main.css
- images (folder)
(have tried giving the image path along with .. and /, no use)
ExtensionlessUrlHandler, are present in the webconfig, hosted on .net framework 4.0 (integrated),
My IIS also co-hosts MVC3 application, which runs fine.
Not sure what is the issue? I am missing something, which hasn't been tried yet, your help would give me some sleep.
Update:
Refering to this post
I changed the bundle according to the answer by Calgary Coder, the image is loading now.