[ASPNET4]Configuration for Styles/Site.css

When you created a ASPNET4 site use the default VS2010 template. then, you set the authorization as:

    <authorization>
      <deny users="?"/>
    </authorization>


Now, you may find that your default page displayed without a style like this:
image

To Solve this problem, you can add a small piece of configuration code to web.config file, under the <configuration> node :

  <location path="Styles/Site.css" allowOverride="true">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>

then, problem solved

image

Another thing, please don’t store the source file under folder : c://Users/…

blog comments powered by Disqus