views:

93

answers:

2

Hi -

I have a ASP.Net 3.5 web site I developed on my old XP sp3 machine. The app uses Master Pages and App_Themes that include style sheet and images - and also an image folder off the main root for most of the images. There are also some javascript files in a /scripts folder for jQuery and one other. I now have a brand new Win 7 64-bit dev machine and I migrated the app there. It compiles and runs fine - even through the Enterprise Library hitting the SQL database - the only problem I am haveing is with the CSS and javascripot files. For some reason that I cannot detect they are not resolving when I run the app. The CSS does resolve at design time and all the styles are rendered correctly in the designer. This leads me to believe that it may be an IIS 7 issue?

Any help greatly appreciatged.

+1  A: 

I have posted what seems to be the same problem in my blog along with the solution.

Funny Problem: Windows 7, IIS 7.5: Images, CSS not showing

check it out and mark this if correct, or comment otherwise.

Regards,

Mohamed Meligy
Thanks Mohamed - enabling Static Content in IIS 7.5 did the trick !
Jim Evans
A: 

There are a number of possible causes.

First, check to make sure that the App_Themes folder, and its subfolders and files, have NTFS permissions that allow them to be accessed by IIS. Same for your images folder. You might need to double-check the AppPool settings to verify the Identity of the IIS user.

If that doesn't fix it, are you using impersonation? Or Windows Authentication?

You might also test the images folder permissions by trying to access the files directly from a browser, without relying on the <asp:Image> control; just key in a direct URL.

RickNZ