Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

ASP Login/Profiles

  • 27-02-2011 9:16pm
    #1
    Registered Users, Registered Users 2 Posts: 19


    Hi all,

    first time posting in this thread but....
    Please help me!!

    I need to create a login/profile system for my website
    Using visual studio/asp.net and the built in sql server express

    i.e so when I log in, I go to my profile
    Jim logins in and goes to his profile etc

    Then admin logs in and it goes to the admin page etc...

    Anyone could provide a link to code or a helpful tutorial online?

    The built in asp.net configuration isn't really what I was looking for!

    Please help me if you can!its for a project thats due really,really soon!

    Thanks
    Charlie


Comments

  • Moderators, Politics Moderators Posts: 41,214 Mod ✭✭✭✭Seth Brundle


    Are you using a database with your site?
    Have a table of users with username/password/userlevels.

    When a user logs in it grabs their userlevel and redirects them based on their userlevel.
    See http://www.daniweb.com/forums/thread6028.html for example


  • Registered Users, Registered Users 2 Posts: 19 CharlieSheen


    Thanks a million

    Is there any way I could do it C# instead of visual basic?
    I'm not good with C# code,but using this in the rest of my project


  • Moderators, Politics Moderators Posts: 41,214 Mod ✭✭✭✭Seth Brundle


    1. Do you know C#?
    2. What else have you managed to do if you aren't good wth C#
    3. Ignore the code in the link I supplied - what is more important is the logic within it (or any of the 200,000 similar tutorials out there).

    I would recommend reading up on session variables. Then based on the users userlevel session variable, when they login, the page redirects to the appropriate URl (e.g. admin.aspx or profile.aspx) depending on whether their userlevel is "admin" or "normal"; 1 or 2; or whatever. However, note that this may result in your site only having one administrator account (if they all redirect to admin.aspx)

    Once you have become more familiar with this stuff, then look up password encryption, hashing and salts.

    I would also look up SQL injection and escaping characters being passed to the database.

    More importantly, I don't know what the site is for but is there an expectation that this will be secure. Then ask yourself, will it be?
    What database are you using?


  • Registered Users, Registered Users 2 Posts: 19 CharlieSheen


    Thanks for all your help,got code off someone earlier and have figured it out.thanks!


Advertisement