471,066 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

forms based auth question

Hi All,
I'm trying to get forms based auth up and working and I'm running into a little snag. My login page needs to access css files and images in my application and when I enable the authentication in web config access to these files are being blocked.

My Webconfig auth section:
Expand|Select|Wrap|Line Numbers
  1.   <system.web>
  2.     <compilation debug="true"/>
  3.     <authentication mode="Forms">
  4.       <forms name=".mycookie" loginUrl="loginform.aspx" timeout="20"></forms>
  5.     </authentication>
  6.     <authorization>
  7.       <deny users="?" />
  8.     </authorization>
  9.   </system.web>
with the deny included my loginpage can only display text and colors - when i remove the :
Expand|Select|Wrap|Line Numbers
  1.     <authorization>
  2.       <deny users="?" />
  3.     </authorization>
then i can refrence css clases in my css docs and the images in my /img folder.

so I am asking 2 questions and seeking 1 answer:

Can I exclude my /css and /img folders from the auth scope?

if not then the other approach I see working would be to include some code in my master page to chech if the user is logged in and if not to redriect them to the login page - as the master page will be included on all aspx pages. but i would perfer another approach as then non aspx pages will be exposed.

or if i'm looking at this all wrong point me toward the correct approach.

Jul 3 '07 #1
0 939

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Brad | last post: by
4 posts views Thread by dhnriverside | last post: by
2 posts views Thread by code | last post: by
8 posts views Thread by =?Utf-8?B?TFc=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.