Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi everybody
I used code below in web.config.
XML
<authentication mode="Forms">
        <forms loginUrl="Login.aspx" />
    </authentication>
 <authorization>
     <deny users="?"/>
 </authorization>


When I am on the login page style is not displayed but when I logged in the default page style is working properly.
When I press the back key ,login page also works well.
What should I do?
However, when I remove the code below everything works well.
XML
<authorization>
        <deny users="?"/>
    </authorization



best regards
Posted
Updated 30-May-11 0:15am
v2

1 solution

You need allow your CSS file to work even with un-authenticated users.
Use below xml in Web.Config:
XML
<location path="myCSS.css">
<system.web>
<authorization>
    <allow users ="*" />
</authorization>
</system.web>
</location>
 
Share this answer
 
Comments
fika_fa 30-May-11 13:09pm    
thanks
Wild-Programmer 31-May-11 3:22am    
Welcome :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900