Login Page loses styles when using Forms authentication

9 Dec

One of my colleagues faced this problem recently while working on a new asp.net site, where his login page was not rendering as per the default stylesheet whereas all the pages displayed fine once the user logged in. When i looked at his web.config file, i saw that anonymous access was blocked to all resources on the site, and adding an <location> element allowing anonymous access to the images and stylesheets folder fixed the issue.
It looks something like

<location path=”img”>
     <system.web>
            <authorization>
                    <allow users=”*”/>
           </authorization>
    </system.web>
</location>

-Latish Sehgal

One Response to “Login Page loses styles when using Forms authentication”

  1. Abigail 16. Jan, 2008 at 4:15 am #

    This helped me out a lot….thanks.

Rss Feed Tweeter button Facebook button