Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I created a brand new project using the default "Web Application" template and I deployed it to a local IIS 7 folder which was set up as an application.

When I access my deployed web site, this is what I see

It looks as though no CSS is being applied but everything looks to be in place, including the CSS files deployed to the \Styles\Site.css subfolder.

When I run it interactively, it looks like the screen everyone has seen before

Can someone take a guess as to what may be causing my styles to have no style?

Update:

It appears to be a rights issue. To which account must I grant access to these folders? Note that I have moved IIS' default folder, or at least tried to.

Of interest: When I compare my security settings on my default c:\inetpub folder to my current default IIS web site location, I see that the original location has granted "TrustedInstaller" full access to this folder but I do not see "TrustedInstaller" as a User, Group or Role on my machine. Can someone explain why or how this works?

IIS_IUSRS does appear to have been granted read rights to this folder.

share|improve this question

4 Answers 4

up vote 2 down vote accepted

I resolved the issue by reinstalling IIS.

visual studio 2010 unable to Publish to local web site. access denied

I appreciate the effort and up voted contributors.

share|improve this answer

The account that must have rights access is whichever account you have assigned to be the anonymous internet user in IIS.

What seems like it may be more likely than a permissions issue is the possibility that the path has changed once you uploaded the application. An easy way to test this is to view the source and look for the <link> reference as well as any preceding <base> tags. Then combine the target and see if they are resolving to the correct absolute location. Also, try entering the correct URL of the stylesheet into your browser. If there is a permissions issue, you will receive the error.

I also noticed you mentioned the location as \Styles\Site.css. The reference in your code should have forward slashes, not backward slashes. In addition, the screenshot you posted that says "Unauthorized", the path is different "/BESI/CSS/MasterPage.css".

It would be easier for us to help you debug this if you post the code to your page that should be including the CSS reference.

share|improve this answer
    
I tried to uninstall IIS7.5 and reinstall and now NOTHING works. sign...I'm in over my head... –  ChadD Jun 8 '11 at 1:28
    
@Velika, why would you do that? I'm actually setting up a server with IIS7 over the next few days. If I catch anything that reminds me of your problem I'll let you know –  smartcaveman Jun 8 '11 at 16:10

If you're running windows 7, make sure that IUSR has Read AND Execute permissions on the folders (like Styles).

Additionally, look at the Authentication settings in IIS for your website. Is anonymous authentication enabled? If so, is the user set to IUSR?

share|improve this answer
    
I am not at my web server at the moment, but I am 99% sure that IUSR_ has read and execute rights. Also, the site works perfectly when deployed to another web server, so the issue isn't with the web site code, I don't think. It also runs perfect when running in the VS IDE using the built in web server. –  ChadD Jun 3 '11 at 15:02
    
@Velika - one option would be to just throw permissions to everyone quickly, then try and see what happens. If you get everything working, you've obviously got a permissions problem. Let me know if you get a chance to try that out.. –  Brett Jun 3 '11 at 15:04
    
I gave EVERYONE full control of D:\INETPUB (I moved IIS's default website to D.) I still get the HTTP/1.1 401 Unauthorized using a Web Console tool. –  ChadD Jun 6 '11 at 1:25
    
@Velika - and you had the permissions trickle down to the sub-directories? –  Brett Jun 6 '11 at 13:09

I'd inspect the NET tab with firebug to find out why this happen. More likely than not, all your CSS files throw 404 not found errors. This will probably point you to the root cause of the problem.

share|improve this answer
    
I will try using Firebug...One thing that I did notice is that AFTER I register as a user, the site works 100%, css and all. However, the same isnt true for my custom app, which has the same issue. However, when I deploy this custom app to another server running IIS, it works fine. Something is off with the local IIS settings, I suspect... –  ChadD May 31 '11 at 1:53
    
Please see update –  ChadD May 31 '11 at 2:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.