468,140 Members | 1,595 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,140 developers. It's quick & easy.

forms based auth question

35
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>
  10.  
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>
  4.  
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.


Thanks
Jul 3 '07 #1
0 854

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
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.