Thomas Sampson

Advanced Forms Authentication

3 Comments

Tonight I realised that with default forms authentication turned on, a linked css file (from a link tag in head) will not load on the login page before a user logs in, so the site has no css before the user logs in!!

Solution

right before the </configuration> in the web.config file add…

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

replace myskin.css with any file you wish to grant unauthorised access to! 🙂

Advertisements

Author: tomtech999

I have recently graduated with a 1st class degree in MComp Games Software Development at Sheffield Hallam University, focusing primarily on application development in C++, with experience in graphics programming, scripting languages, DVCS/VCS and web technology. In my spare time I enjoy Drumming, Reading and Snowboarding!

3 thoughts on “Advanced Forms Authentication

  1. Thanks Tom! That certainly helped.

  2. THANK YOU FOR THIS !! Been breaking my head up about this. Spend a lot of time creating my CSS layout which did not work anymore with forms authentication…

  3. Thanks a million Tom! You saved my evening!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s