1

I have had to reinstall windows over the weekend (win 7 ultimate 64 bit), and have reinstalled Visual Studio, specifically VS 2010 Ultimate, along with the Azure SDK, EntityFramework, and some other assorted frameworks.

I ran into some issues trying to test my Azure app after doing so, whereby the role wouldn't start until I manually enabled IIS, and ran aspnet_regiis. At this point the app will run, and pull up the login page like it's supposed to, but now neither the css nor javascript files will pull up. For some reason just the basic html loads up, and I can log into my app and proceed to the next page, but that's about it; as my app relies heavily on ajax I can't go much further.

If I try to pull up the Content/Site.css file directly (in my browser), I just get a blank file, same with the js file we use. (The server is responding with 200 OK, but then just a blank file)

I'm not really sure what to do, but I will point out that this project/solution did build and work fine before the reinstall, so it shouldn't be anything code-wise that's at fault; something in the environment. I do notice that if I pull up my the Content folder in explorer through my deployment in IIS manager, that the Site.css file is there.. so I'm not sure why it wouldn't be served?

I was tempted to try to reinstall the Azure SDK, but I installed it with the Web Platform Installer v4.0 and I don't see any way to uninstall using this tool.

Any suggestions?

Thanks in advance!

4
  • Although 200 and not 500, it might be the same sort of problem as here Commented Nov 15, 2012 at 4:00
  • Check the mime types in IIS? Commented Nov 15, 2012 at 4:05
  • Thans nrodic but I don't think it's the same issue.. I don't have any config files in my Content or Scripts folders. Pete, I will try to look into that. I wouldn't be surprised if it was somehow IIS related, since again my code hasn't changed since it last worked. Commented Nov 15, 2012 at 7:37
  • As it turns out, I didn't have the option for "MIME types" in my IIS Manager, and when I dug around to find out why, it lead to realizing the 'Static Content' setting needed to be enabled.. so, thanks Pete for setting me in the right direction :) Commented Nov 15, 2012 at 8:34

2 Answers 2

2

As it turns out the issue was again in the Windows Features, although I had enabled IIS / Asp.Net (which enabled a bunch of other features automatically), apparently I still had to manually enable the option 'IIS/World Wide Web Services/Common HTTP Features/Static Content'.

This allows these static files to be served by IIS.

Thanks for the help guys!

Sign up to request clarification or add additional context in comments.

Comments

0

If you deny authorization in the main web.config the css will not show up

  <system.web>
    <authorization>
      <deny users="?"/>
    </authorization>
  </system.web>

1 Comment

That would result in errors or redirects to a login page; the OP posted that the problem was that Static Content was not enabled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.