|
-
Oct 23rd, 2009, 01:55 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] membership provider question
Hi I have a question about the membership provider that's built in with asp.net. On the creatuserwizard control, it doesnt have city, state on it, and I want to collect that info upfront when they sign up using that wizard control.
My question is, once the user clicks on "Create User" button, it will store the data in the asp.net_user table, but how do I store the city and state and where to?
-
Oct 23rd, 2009, 03:06 PM
#2
Re: membership provider question
Hey,
In addition to the membership provider, you can use the profile provider to collect this data. You can add steps to the createuserwizard to collect this data.
Have a look at the link in my signature for info on how to use the profile provider.
Hope that helps!
Gary
-
Oct 23rd, 2009, 03:15 PM
#3
Thread Starter
Frenzied Member
Re: membership provider question
OK, now my question is in asp.net if the user is created, it automatically adds stuff to the "Membership" table. I want the user to activate their email address first before they can login. How do I do that with the membership provider?
-
Oct 23rd, 2009, 03:30 PM
#4
Thread Starter
Frenzied Member
Re: membership provider question
oh and how come I don't have the profilecommon?
-
Oct 23rd, 2009, 04:31 PM
#5
Re: membership provider question
Hey,
I would recommend that you take a look here:
http://aspnet.4guysfromrolla.com/articles/062508-1.aspx
Particularly part 11, as I believe this will cover everything that you need to in order to enable a confirmation email.
As for why you don't have ProfileCommon, I would suggest that this is because you don't have the right imports statement. If you hover over ProfileCommon, does Visual Studio not offer you some help?
Gary
-
Oct 23rd, 2009, 04:40 PM
#6
Thread Starter
Frenzied Member
Re: membership provider question
I think because I am using web application as opoosed to website that's why profile common is not available.
-
Oct 23rd, 2009, 04:44 PM
#7
Re: membership provider question
Hey,
What makes you think that?
Although the application sample I pointed you to uses a Web Site Template, I believe I also have a working sample using a Web Application Template, although, I would have to dig this up on my other machine.
Now that you mention it though, I do readins something about this ages ago. I will see what I can dig up.
Gary
-
Oct 23rd, 2009, 04:51 PM
#8
Re: membership provider question
Hey,
Have you enabled the Profile Provider?
The documentation here, suggests that ProfileCommon inherits from System.Web.Profile:
http://msdn.microsoft.com/en-us/libr...b.profile.aspx
Have you included this in your project?
Gary
-
Oct 23rd, 2009, 04:58 PM
#9
Thread Starter
Frenzied Member
Re: membership provider question
Yes, gep I did enable the provider, and profilecommon, but like I said it's because I am doing web application and not websites.. does that make sense?
-
Oct 24th, 2009, 09:02 AM
#10
Re: membership provider question
Hey,
I know what you are referring to, but like I said, I don't think this should be an issue. I am not at my own computer just now, so I don't have Visual Studio installed, so can't knock up a sample for you. When I get a chance, I will see what I can do for you.
Gary
-
Oct 25th, 2009, 01:45 PM
#11
Thread Starter
Frenzied Member
Re: membership provider question
hey gep, have u found this out yet?
-
Oct 26th, 2009, 02:55 AM
#12
Re: membership provider question
Hey,
I have just had a quick play this morning (still need to do some investigation), but it would appear that ProfileCommon doesn't work within a Web Application.
My initial investigation has turned up, ProfileBase, which can be used to save the Profile values:
Code:
ProfileBase userProfile = (ProfileBase)ProfileBase.Create(CreateUserWizard1.UserName, true);
userProfile.Save();
But I need to do some more looking into it.
Gary
-
Oct 26th, 2009, 03:08 AM
#13
Re: membership provider question
Hey,
Ok, looks like this could be a known issue, to the extent that people have created an Add-In that will do the work for you.
Looks like when you use an ASP.Net WebSite Template, the Profile Settings are compiled into the ProfileCommon object dynamically, and are available at runtime in a strongly typed manner. This doesn't happen directly when you use a Web Application Template.
However, this:
http://weblogs.asp.net/joewrobel/arc...-projects.aspx
Should hopefully help you out!
Gary
-
Oct 26th, 2009, 10:43 AM
#14
Thread Starter
Frenzied Member
Re: membership provider question
Yeah.. I am using ProfileBase
-
Oct 26th, 2009, 10:44 AM
#15
Re: [RESOLVED] membership provider question
Hey,
Glad to hear that you got it working!!
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|