views:

104

answers:

2

I have a login page that inherits a masterpage that has my navigation controls. I enabled forms authentication and when I run my code and the login page appears all the images and css values are not working. If I stop the application and go to design view everything is there like it should be, if I turn off forms auth and set it back to windows and run my site the login.aspx form shows up with all the images and css values.

Do I need to set the authentication on the images folder to allow everyone or something of this nature?

A: 

Yep, you do. Generally you put that content outside in a 'non-authorised' area. (i.e. your authorisation-required pages go in /auth and all non-auth go in /public; something of that nature).

Noon Silk
+1  A: 

Do I need to set the authentication on the images folder to allow everyone or something of this nature?

Yes. That is exactly what you need to do. To do this, you need to add something like this to your web.config file (one of these for every folder that should not be authenticated). Add it as a sibling of the system.web element

<location path="Images">
    <system.web>
        <authorization>
            <allow users="*"/>
        </authorization>
    </system.web>
</location>
Gabriel McAdams