I have a similiar problem as the user here: Asp.NET not applying my CSS files
but when adding the code below to my web.config nothing happens.
<location path="css">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
The css file is still not loading. When I try to open it in a web browser by viewing the source, it opens a blank page with the correct URL (http://localhost/css/style.css). The only time when css is applied, is when I run the application from Visual Studio.
My web.config file is
<?xml version="1.0" encoding="UTF-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="EDCConnectionString" connectionString="Data Source=.;Initial Catalog=EDC;Persist Security Info=True;User ID=web;Password=web" providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation targetFramework="4.5.2" debug="true">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5.2" />
<authentication mode="Forms">
<forms defaultUrl="~/Home.aspx" loginUrl="~/Login.aspx" slidingExpiration="true" timeout="2880" />
</authentication>
</system.web>
<location path="css">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appSettings>
<system.webServer>
<security>
<requestFiltering>
<fileExtensions>
<add fileExtension=".css" allowed="true" />
</fileExtensions>
</requestFiltering>
</security>
</system.webServer>
</configuration>