Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 25th, 2008, 05:25 PM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default Custom Membership provider question

Hi:

For the membership providers that ship with ASP.NET 3.5, where is the class file located with all the properties and functions? I want to see how all the methods are written and to customize those methods with my own code.

I know i could for example, create a seperate class file and write the following:

public class xmlMembershipProvider inherits membershipProvider

and it would give me a list of all the functions and properties associated with the file.


I would, however, like to see the source class and all the completed functions and properties..

any help?

Reply With Quote
  #2 (permalink)  
Old July 25th, 2008, 05:28 PM
Imar's Avatar
Wrox Author
Points: 66,800, Level: 100
Points: 66,800, Level: 100 Points: 66,800, Level: 100 Points: 66,800, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,156
Thanks: 65
Thanked 1,393 Times in 1,373 Posts
Default

Take a look here: http://weblogs.asp.net/scottgu/archi...13/442772.aspx

You can download the full source...

Imar
Reply With Quote
  #3 (permalink)  
Old July 27th, 2008, 09:44 AM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi:

Thanks!

Another question, maybe others are having the same thoughts:

For example, say if I want to add an extra field to the login control
such as a PIN number. How would you go about configuring the sqlmembership provider to work with that new field, as well as the new field you would have to add to the database? How does the sqlmembership provider know to work with a new field in the database? How would you go about setting that up?

Best,
aspC



Reply With Quote
  #4 (permalink)  
Old July 27th, 2008, 09:59 AM
Imar's Avatar
Wrox Author
Points: 66,800, Level: 100
Points: 66,800, Level: 100 Points: 66,800, Level: 100 Points: 66,800, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,156
Thanks: 65
Thanked 1,393 Times in 1,373 Posts
Default

There are a few ways to do this. First, you could create your own provider and then extend the MembershipUser class and add new properties.

For more info: http://fredrik.nsquared2.com/viewpost.aspx?PostID=322

However, I find this not intuitive to work with. Instances of MembershipUser returned from the Membership API are returned as MembershipUser, not your custom type, so you always need to remember to cast the return value into your own type.

IMO, it's much easier to use Profile for this. For more info:

http://weblogs.asp.net/scottgu/archi...18/427754.aspx

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Membership Provider Scott663 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 August 1st, 2008 05:16 PM
Custom Membership Provider kulkarnimonica ASP.NET 2.0 Professional 0 June 21st, 2007 03:56 PM
problem with custom membership provider hertendreef ASP.NET 2.0 Professional 8 April 17th, 2007 12:11 PM
Issue with custom membership provider cacaldo ASP.NET 2.0 Professional 1 October 7th, 2006 03:05 AM
custom membership provider msrnivas General .NET 1 September 18th, 2005 04:28 AM



All times are GMT -4. The time now is 06:24 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.