CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 1/12/2005 11:22:48 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 12 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
kami909
Asp.Net User
form based authentication problem plz help1/12/2005 11:22:48 AM

0/0

hello folks ...

The problem is... in my project there is several folders and in each folder there have their respective aspx forms ...

what i want is to authenticate users

let say i have 3 folders in my project

Admin
Customer
Vendors

all have there respective login page in the folder ..how would i authenticate them?? and if they r not authorize redirect them to there respective login page...

if any one know about this problem plz help me ...


Thanx alot hoping 4 the reply soon ..


Kamran Sorathia
Damon.Armstrong
Asp.Net User
Re: form based authentication problem plz help1/12/2005 3:23:50 PM

0/0

First, you will probably want to only use a single login form instead of one for each different user. Forms authentication can only send un-authenticated users to a single form, so it would be very confusing if a vendor tried to access a protected resource and was redirected to the Admin login form.

Next, you will probably need to setup Forms authentication to use roles, and define Access Rules for each directory that will keep users from un-authorized roles from accessing items in specific folders. Assuming that you have the following three roles for your application:

Admin
Customer
Vendors

you can then Access Rules as follows. In the Admin folder, create a new web.config file. Add something similar to the following to it:

<authorization>
<deny users="?"/>
<allow roles="Admin"/>
<deny users="*"/>
</authorization>

This ensure that unauthenticated users cannot access the Admin folder (<deny users="?"/>), that anyone in the Admin role can access the folder, and that everyone else cannot access the folder. (You may have to check into the syntax of this, I'm not sure if it's perfect). You will have to setup a web.config file for each folder you want to protect. Make sure that you allow un-authenticated users to access the directory in which your login form is located or else un-authenticated users will have no access to the login form, which they need to become authenticated.

So now the question is, how do you define roles, etc. You can define them in the web.config, or you can define them in a database and write some code to load them into the authentication ticket (you could do a lot of other things two, but those are probably the most popular). Here's some links on how to go about doing that:

http://www.xoc.net/works/tips/forms-authentication.asp
http://aspnet.4guysfromrolla.com/articles/082703-1.2.aspx

If you google for "asp.net forms authentication with roles" you should come up with a wealth of sites that can help you out.

Damon Armstrong
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:

Web:
form based authentication problem plz help - ASP.NET Forums form based authentication problem plz help. Last post 01-12-2005 10:35 AM by Damon. ... Re: form based authentication problem plz help ...
PLZ HELP: Authentication ticket.. - ASP.NET Forums PLZ HELP: Authentication ticket.. Last post 09-09-2008 5:01 AM by Wencui Qian ... authentication problem, asp.net form based authentication, Authenticate, ...
Forms Base Authentication Tools and Utils for SharePoint 2007 ... Sep 12, 2007 ... Wiki Link: [discussion:15060]. wss 3.0 form authenticaion--urgent help plz Tags: Forms Based Authentication, SharePoint ...
Microsoft SharePoint 2007: ChangePassword page for FBA(Form based ... Jul 20, 2007 ... Once you enable the form authentication, how a user can change the .... Plz help me... Thanks in Advance Alok... 9:58 AM ยท Robert said. ...
Pranab Paul's Blog - SharePoint 2007 (MOSS/WSS 3.0) Development ... How to Implement Form Based authentication in SharePoint 2007 (MOSS/WSS) .... I need it bcoz our ADS hierarchy is of domains and sub domains, plz help. ...
CodeProject: Roles-Based Authentication. Free source code and ... Implement a Roles-Based Authentication using ASP.NET Forms Authentication ... General, Plz help me out, member, nishil@rediffmail.com, 0:14 30 Aug '05 ...
Re: Plz Help Needed! The type initializer threw an exception ... NET 2005 connection string; Next by Date: Re: Forms Authentication problem: Previous by thread: Plz Help Needed! The type initializer threw an exception. ...
[NoCat] everytime redirects to the authentication screen(plz help me) [NoCat] everytime redirects to the authentication screen(plz help me). bijayant kumar bijayant4u at yahoo.com Sat Apr 7 02:03:07 PDT 2007 ...
Active Directory & Forms Authentication - ng.asp-net-forum ... Example Web.config files for LDAP forms-based authentication ... and WSSUsers groups ... IIS & Active Directory p2p.wrox.com Forums - plz help me?? iis ...
MSDN SharePoint - Development and Programming add users to ... Can u plz help me to get out of this problem ? Hi to All, ... My website has been configured as forms-based authentication website. ...




Search This Site:










"back" button on showad.aspx

cannot upload to c:\inetpub\wwwroot\

cookieless forms auth & traling slash problem

if loops with hyperlinks

i'm looking for developers to help convert modules from 2.1 to 3.x.

how to display this data...?

specified cast is not valid--please help

actions menu line break -- how to prevent?

what servers do asp.net sites run on -iis or apache?

index server locking files

asp.net 2.0 web service design page missing

displaying and paging large text

authentication problem

english text not found

need some opinions pls..

converting from access to sql server

in form view insert mode

search function

security problem

adding user to role (vb)

listbox multiple selected items

displaing data based on session variable

profile.username

on par with expo.live.com

cookies in simple text?

unable to login as admin or host

dynamically change the src for an image <img> based on a label's text value

creating a new asp.net application - unc share error

getting so frustratued, please help. can't do the "else" block in a if conditional

timezone issues

 
All Times Are GMT