views:

19

answers:

2

I am using forms authentication in a MVC 2 project.

I have this in my web.config:

 <authorization>
     <deny users="?" />
 </authorization>

I want the /Content folder to be available to users that haven't been authenticated yet. The login view uses the css in that folder, which should be available at login time.

Thanks

A: 

do you mean:

 <authorization>
     <allow users="*" />
 </authorization>
davidsleeps
No, it is like I posted it on the question.
DanC
sorry, I should have explained more...that was the declaration I was wanting you to try...
davidsleeps
A: 

you can use the css file as a location in your config file like this:

<location path="whatever.css">
    <system.web>
        <authorization>
            <allow users="*"/>
        </authorization>
    </system.web>
</location>

This would be external of your main system.web block i believe

if this content folder is a separate folder it can have its own web.config file that you can set to allow=*

jumpdart
Thanks!, I added a new Web.config file inside the /Content folder with <allow users="*"/>
DanC