PDA

View Full Version : Plz Friends I need help with my project



cheikhanio
05-18-2008, 08:41 PM
Hello everybody i am trying tp prepare to my project but unfortunately i found many difficulties in asp.net 1.1.
I have a formweb which is a secure page and a loginMember forms i had configure them in web.config file and everything is going well.in the next question says that i should create an other form just for administrators(LoginAdministrators),i don't know what i can do in the web.config.and i should have 2 forms of login in my application the first for members and the second for administrators how i can configure my web.config file?????????
Note that my application is realized in asp.net 1.1 with a database of sql server 2000 i have a table in the database members:ermm::ermm::ermm::ermm:

Snee
05-18-2008, 10:22 PM
One way to do roles. (http://msdn.microsoft.com/en-us/library/5k850zwb.aspx) Note that it won't work too well with the cookie-based forms-authentication I showed you, or at all, even.

Assuming you don't have to do it with some other type of authentication, one very simple way to do it is to set another cookie on login, containing a string or something denoting what type of user it is, if you're worried about security you could attach the ip of the user to whatever else you put in it, and encrypt the whole string or something.

Then you just have a check in the page_load of the protected page, checking if the role set in the cookie matches in the if, if not you redirect to the login page or something.

I googled it and found something slightly more elaborate, and probably more secure: lookie here. (http://www.howtodothings.com/computers/a792-aspnet-forms-authentication-with-roles.html)

Either should do it, I reckon.

cheikhanio
05-19-2008, 05:04 PM
thiks so much