DotNetSurfers

Latish Sehgal's Blog

Login Page Loses Styles When Using Forms Authentication

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 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="*"></allow> </authorization> </system.web> </location>

-Latish Sehgal

Comments