Solved

How do I create a Custom MembershipProvider?

Posted on 2006-11-05
3
260 Views
Last Modified: 2009-10-08
I have read postings all over the Internet including the one that was supposedly solved on your website titled "ASP.Net 2.0 - Adding extra information to the CreateUserWizard". Unfortuantely the link to the solution that was accepted no longer works and/or requires special access (it points to a Beta site).

I simply want to create a custom class that inherits from the SqlMembershipProvider class and override the CreateUser method so it accepts more arguments like FirstName, LastName, Address1, Address2, City, State, Zip, Phone etc.

I do not with to use the profile table at this stage. I have an existing database structure setup and I need to allow users to register for my site using my Custom provider, store the basic info in Microsoft's default aspnet_membership_user table and then execute another stored procedure that puts the remaining custom fields in my own table.

My problem is that I want to use pretty much all of the existing functionality that the SqlMembershipProvider has but just modify that one method (CreateUser). When I try to do that I get errors telling me that either some library is missing, protected or inaccessible due to security reasons (i.e. SecUtil class is declared internal) or a variety of other irritations. I don't know what to do. I managed to get the source code for the SQLMembershipProvider from Microsoft's website. It references a bunch of other libraries, two of which (SR and SecUtil) are giving me a really hard time b/c even though I have the source for them and try to include them in my project, it still seems like the compiler doesn't even know they are there!

Please help!

Thanks

UPDATE: I have actually made progress since posting this. I am now able to use my own provider (almost). I at least have the page calling my custom provider b/c I am getting an error when I try to create the new user and the error is found in my custom provider code but at least it's actually USING my custom provider.

The error is that it seems as though the Initialize method is not getting the connectionStringName passed in and therefore my exception handler is flagging it.
0
Comment
Question by:aschreiber2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Accepted Solution

by:
aschreiber2 earned 0 total points
ID: 17878497
Hooray for me!!!

I found the answer to my own question! Do I get points for it???

http://aspnet.4guysfromrolla.com/articles/070506-1.aspx
0
 
LVL 27

Expert Comment

by:Sammy
ID: 17878838
Go http://www.experts-exchange.com/Community_Support/ and ask for this question to be deleted and points refunded!
make sure you provide the link for the question http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/Q_22049798.html

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question