3

I’m building a new Web server, and I'm redeploying an ASP.Net site that works fine in IIS6

Unfortunately, none of the images are loading (I'm getting 404’s on them). The images are in the proper folder, and I can even navigate to pages fine in the site.

any suggestions?

KevinDeus
  • 11,988
  • 20
  • 65
  • 97
  • Did you look at the server logs to see what the requested urls are, v.s. where they really are? – Marc B Mar 16 '12 at 16:04
  • This is probably a stupid question, and I'm sure you've already checked, but just in case... have you checked that the files have been correctly deployed to the new server? – Carl Sharman Mar 16 '12 at 16:17
  • good question. They have been deployed. I'm curious is some IIS 7 security feature is preventing access to that type of content.. – KevinDeus Mar 16 '12 at 16:35
  • Is your site running in classic mode or integrated pipeline mode? Try switching to Classic mode to see if that helps.. – Mike Christensen Mar 16 '12 at 16:45
  • it was running in Integrated, but switching to Classic and restarting IIS has no effect – KevinDeus Mar 16 '12 at 16:50
  • I *DO* notice that When I hit Edit Application>Test Settings, it says "Invalid Application Path", but I'm not sure what that means, as the pages are loading, just not images – KevinDeus Mar 16 '12 at 16:52
  • Yup, it's pretty clear that the virtual path is not pointing to the correct physical directory on the server. Are you sure your `images` directory isn't a vdir that is pointing to an invalid path? – Mike Christensen Mar 16 '12 at 17:16
  • hmmmm. not sure why that would be. I "Add"ed an Application, and pointed it to the directory I am publishing to. After publish, those files and folders appear when I expand the application. Am I missing a step? – KevinDeus Mar 16 '12 at 17:18
  • 1
    I'm out of ideas then. Create a file called `foo.txt` in the Images directory and see if you can get to that. If so, it's either a problem with the extension mapping for image files, or a permissions issue with the files themselves. – Mike Christensen Mar 16 '12 at 18:01
  • apparently it was a permissions thing. I gave IUSR access to the web deploy directory and it now works. – KevinDeus Mar 16 '12 at 18:51

3 Answers3

6

could be a problem with your handlers.

http://gurustop.net/blog/2009/10/12/funny-problem-windows-7-iis-7-5-images-css-not-showing/

DotNetUser
  • 6,494
  • 1
  • 25
  • 27
0

If you try and browse an image using the browser do you get the image?

Sachin Kainth
  • 45,256
  • 81
  • 201
  • 304
0

Give IUSR read access to the directory.

Remember, I'm building this server from scratch.. Its hard to believe that was not set up as some kind of default.

to give due credit on this one, this link clued me in: (I have not touched the app pools in my case)

http://forums.asp.net/post/3738818.aspx

KevinDeus
  • 11,988
  • 20
  • 65
  • 97
  • :) I can only assume it was because I had created a folder inside of wwwroot>inetpub, and put the web application in that. The permissions must not have propagated. All of the subdirectories (including images) were affected. – KevinDeus Mar 16 '12 at 20:47