Results 1 to 3 of 3

Thread: Authentication help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2006
    Posts
    121

    Authentication help

    Hey there,

    I've been using authentication and authorisation in web pages for a while,,, except I never really had much of a need to make it more advanced. Atm I just have it so it blocks everyone out of the whole site and redirects them to the login page, then they have free roam to everyhting else.

    What I would like to know is, is there any tutorials out there or anything that goes in to this in more of an advanced manner?

    In the end I would like to have users view half the site without needing a login,, and then certain users with a login to view some sections and other users differnt sections..

    any advice would be greatly appreciated,, thanx in advance

  2. #2
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092

    Re: Authentication help

    You can use the web.config to change which area's of your site are available to anonymous users etc.
    Code:
            <!-- Will not allow un-authenticated users to access a folder called restricted in your web app -->
    	<location path="restricted">
    		<system.web>
    			<authorization>
    				<deny users="?"/>
    			</authorization>
    		</system.web>
    	</location> 
    
            <!-- Will allow anyone to access a folder called registration -->
    	<location path="registration">
    		<system.web>
    			<authorization>
    				<allow users="?"/>
    			</authorization>
    		</system.web>
    	</location>
    That would be a simple way of seperating your site but you can also look into using roles.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Authentication help

    You don't get tutorials for these things, it's more of a combination of logic/common sense which you use to make it work the way you want.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width