The first issue I had was that the site would redirect to login.aspx like it was supposed to, but the login.aspx page would be missing all of the style information from our CSS style sheet. I looked in the Firefox error console (Firefox Web Developer Extension ) and noticed an entry about the site being unable to grab the style sheet because it was the wrong MIME type: it was text/html, when it expected CSS files to be text/css. After banging my head against the MIME type error message for awhile, I had the idea that maybe the type was text/html because it was getting a 404 response when asking for the style sheet. Sure enough, it wasn't too long then before I figured out that Forms Authentication and my Web.config settings were preventing unauthorized users from grabbing my style sheet. Solution - made a second Web.config and placed it in my App_Themes directory where my style sheet lives.
you could also use <location> sections in your root web.config to set access permissions for subdirectories.
<!-- Allow all users to view the images directory -->
<location path="Images" allowOverride="false">
This way, your access permissions are all in one place.
Yes, that is actually the way I do it now too Mmmagic. Thanks for updating my article!
I like keeping all of the permissions in one place. Especially once you start getting into having a site map and role-based permissions.
Hi There! Really cool site . Ok so I'm always searching for this kind of stuff. I have this fascination thing. Keep up the good work! http://www.andolasoft.com/services/asp.net-application
Great, but a little bit difficult for me!!
Post a Comment