I am facing a similar issue to the one described by another user on Stack Overflow here: Asp.NET not applying my CSS files
However, after adding the following code to my web.config file, nothing seems to change:
<location path="css">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
Despite this, the css file continues to not load. When I attempt to open it in a web browser using the correct URL (http://localhost/css/style.css), it only displays a blank page. The CSS is only applied when I run the application from Visual Studio.
Here is a snippet of my web.config file:
<?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>
... (rest of the configuration details) ...
</configuration>