Monday, 15 February 2010

asp.net - Can't access css after adding to web.config -



asp.net - Can't access css after adding <authentication> to web.config -

the webpage creating can't access css file.

take @ webconfig:

<configuration> <system.web> <compilation debug="true" targetframework="4.0"> <assemblies> <add assembly="mysql.data, version=6.2.5.0, culture=neutral, publickeytoken=c5687fc88969c44d"/> <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> </system.web> <location path="css"> <system.web> <authentication mode="forms"> <forms name=".aspxformsdemo" loginurl="login.aspx" protection="all" path="/" timeout="60"/> </authentication> <authorization> <deny users="?"/> <allow users="*"/> </authorization> </system.web> </location> </configuration>

i found reply here:

authorization issue - anonymous users can't access .jpeg or .css

but when tried put

<location path="css">

on top of 'system.web' didn't work. please help me prepare this. help guys!

the location tag has direct kid of configuration

put under existing <system.web>

<configuration> <system.web> ... </system.web> <location path="css"> <system.web> <authorization> <allow users="?" /> </authorization> </system.web> </location> </configuration>

asp.net authentication config

No comments:

Post a Comment