![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Man Bear Pig Hunter
Join Date: Jul 2005
Location: NorCal, USA
Posts: 289
Rep Power: 3
![]() |
ASP.Net Login Control
Info for the control can be found here. But that isn't the point of this thread.
I was wondering how many people us it, vs making your own login system. To me it seems making your own would allow for a lot more control, yet I've never used the login control enough to know what it can do. |
|
|
|
|
|
#2 |
|
Professional Programmer
|
Re: ASP.Net Login Control
I have used the Membership system in ASP.NET on several occasions and i can say that is very customizable.
First you can create a custom provider just by specifying in the web.config file things like : what database to use, if the email should be unique, what length the password , if you want sliding expiration or not ... etc. Then if you want even more control, you can derive from the MembershipProvider class and override methods like ValidateUser .. I think I have at work some good links for this but I doubt it's something google couldn't answer . As for needing a custom control , I guess that's always an option depending on the requirements. PS: for installing the membership tables, there is a command line tool that can do that but on cool class it took me a while to find out about is : csharp Syntax (Toggle Plain Text)
__________________
Don't take life too seriously, it's not permanent ! |
|
|
|
|
|
#3 |
|
Man Bear Pig Hunter
Join Date: Jul 2005
Location: NorCal, USA
Posts: 289
Rep Power: 3
![]() |
Re: ASP.Net Login Control
Xavier, awesome post. Very helpful, i might just make a demo db and play with it now. I didnt know it had all that.
Any other tips or tricks you know of? |
|
|
|
|
|
#4 |
|
Professional Programmer
|
Re: ASP.Net Login Control
And I was only talking about the Membership feature but you can have Roles and Profile for users.
Roles is quite a nice feature , it allows you to have something like this: <asp:LoginView runat="server" ID="mainLoginView" OnPreRender="mainLoginView_PreRender">
<AnonymousTemplate>
something for anonymous users
</AnonymousTemplate>
<RoleGroups>
<asp:RoleGroup Roles="Administrator">
<ContentTemplate>
.. something for administrators
</ContentTemplate>
</asp:RoleGroup>
<asp:RoleGroup Roles="Operator">
<ContentTemplate>
... something for the operators
</ContentTemplate>
</asp:RoleGroup>But it will come a point in time when you want to customize the create user control. Now that's ok, not that hard . But when you want to get the value of another control (let's say you put a dropdownlist) you have to do this : csharp Syntax (Toggle Plain Text)
And let's just say it wasn't the first thing that came to my mind.
__________________
Don't take life too seriously, it's not permanent ! |
|
|
|
|
|
#5 |
|
Man Bear Pig Hunter
Join Date: Jul 2005
Location: NorCal, USA
Posts: 289
Rep Power: 3
![]() |
Re: ASP.Net Login Control
Xavier, I'm having a little issue creating a custom Provider, basically getting the ASP.NET Web Site Administration Tool to read and be able to connect to a remote MS SQL Database. I have been having trouble locating any site that guides me or provides me with the missing information to complete this task.
If you know of any resourses that'd be great, I'd like to start using and learning how to use this old yet amazing part of the framework. Thank you. |
|
|
|
|
|
#6 |
|
Professional Programmer
|
Re: ASP.Net Login Control
How's your web.config looking like ?
__________________
Don't take life too seriously, it's not permanent ! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Login in ASP.NET Help | bigguy | ASP.NET | 1 | Nov 18th, 2007 12:36 PM |
| How to add inherited control to toolbox. | InfoGeek | C# | 3 | Feb 8th, 2007 9:12 PM |
| [IDEA] ASP.NET Web Control Panel | mjhoagland | Project Ideas | 1 | May 30th, 2006 2:54 PM |
| Show web user control hidden | see07 | C# | 1 | Feb 2nd, 2005 10:35 AM |
| how to login computers with same login and password | Tiger | Java | 5 | Jan 31st, 2005 7:53 PM |