PC Review


Reply
Thread Tools Rate Thread

Create user. Please, need advice on anonymous ...

 
 
shapper
Guest
Posts: n/a
 
      22nd Nov 2008
Hello,

I am creating a user following the steps:

Get User Anonymous Profile > Create User > Create User Profile > Copy
Anonymous Profile to User Profile > Delete User Anonymous Profile >
Send Confirmation Email

The user needs to confirm it's email to approve the account by
visiting the URL that is sent by email.

Until the account has been confirmed the user cannot login.

This is my code:

MembershipCreateStatus status;
ProfileHelper anonymous = ProfileHelper.GetProfile();
MembershipUser user = Membership.CreateUser(username, password,
email, null, null, false, null, out status);

if (user != null) {
ProfileHelper profile = ProfileHelper.GetProfile(username);
profile.Visitor = anonymous.Visitor;
AnonymousIdentificationModule.ClearAnonymousIdentifier();
profile.Save();
MailHelper.SendConfirmationEmail
}

ProfileHelper is a custom profile provider that works as following:

- Get an user profile given the username: ProfileHelper.GetProfile
(username);

- Get current user profile (if anonymous get anonymous profile. If
authenticated gets the authenticated profile): ProfileHelper.GetProfile
();

I am having only one error:

System.NotSupportedException: ClearAnonymousIdentifier is not
supported when the feature is disabled or the user is anonymous.

On the following code line:

AnonymousIdentificationModule.ClearAnonymousIdentifier();

Could someone help me to solve this?

Thanks,

Miguel
 
Reply With Quote
 
 
 
 
shapper
Guest
Posts: n/a
 
      24th Nov 2008
On Nov 22, 5:57*pm, shapper <mdmo...@gmail.com> wrote:
> Hello,
>
> I am creating a user following the steps:
>
> Get User Anonymous Profile > Create User > Create User Profile > *Copy
> Anonymous Profile to User Profile > Delete User Anonymous Profile >
> Send Confirmation Email
>
> The user needs to confirm it's email to approve the account by
> visiting the URL that is sent by email.
>
> Until the account has been confirmed the user cannot login.
>
> This is my code:
>
> * *MembershipCreateStatus status;
> * *ProfileHelper anonymous = ProfileHelper.GetProfile();
> * *MembershipUser user = Membership.CreateUser(username, password,
> email, null, null, false, null, out status);
>
> * *if (user != null) {
> * * *ProfileHelper profile = ProfileHelper.GetProfile(username);
> * * *profile.Visitor = anonymous.Visitor;
> * * *AnonymousIdentificationModule.ClearAnonymousIdentifier();
> * * *profile.Save();
> * * *MailHelper.SendConfirmationEmail
> * *}
>
> ProfileHelper is a custom profile provider that works as following:
>
> * * - Get an user profile given the username: ProfileHelper.GetProfile
> (username);
>
> * * - Get current user profile (if anonymous get anonymous profile. If
> authenticated gets the authenticated profile): ProfileHelper.GetProfile
> ();
>
> I am having only one error:
>
> System.NotSupportedException: ClearAnonymousIdentifier is not
> supported when the feature is disabled or the user is anonymous.
>
> On the following code line:
>
> AnonymousIdentificationModule.ClearAnonymousIdentifier();
>
> Could someone help me to solve this?
>
> Thanks,
>
> Miguel


Please, anyone?

Thank You,
Miguel
 
Reply With Quote
 
shapper
Guest
Posts: n/a
 
      24th Nov 2008
On Nov 24, 3:01*am, shapper <mdmo...@gmail.com> wrote:
> On Nov 22, 5:57*pm, shapper <mdmo...@gmail.com> wrote:
>
>
>
> > Hello,

>
> > I am creating a user following the steps:

>
> > Get User Anonymous Profile > Create User > Create User Profile > *Copy
> > Anonymous Profile to User Profile > Delete User Anonymous Profile >
> > Send Confirmation Email

>
> > The user needs to confirm it's email to approve the account by
> > visiting the URL that is sent by email.

>
> > Until the account has been confirmed the user cannot login.

>
> > This is my code:

>
> > * *MembershipCreateStatus status;
> > * *ProfileHelper anonymous = ProfileHelper.GetProfile();
> > * *MembershipUser user = Membership.CreateUser(username, password,
> > email, null, null, false, null, out status);

>
> > * *if (user != null) {
> > * * *ProfileHelper profile = ProfileHelper.GetProfile(username);
> > * * *profile.Visitor = anonymous.Visitor;
> > * * *AnonymousIdentificationModule.ClearAnonymousIdentifier();
> > * * *profile.Save();
> > * * *MailHelper.SendConfirmationEmail
> > * *}

>
> > ProfileHelper is a custom profile provider that works as following:

>
> > * * - Get an user profile given the username: ProfileHelper.GetProfile
> > (username);

>
> > * * - Get current user profile (if anonymous get anonymous profile.If
> > authenticated gets the authenticated profile): ProfileHelper.GetProfile
> > ();

>
> > I am having only one error:

>
> > System.NotSupportedException: ClearAnonymousIdentifier is not
> > supported when the feature is disabled or the user is anonymous.

>
> > On the following code line:

>
> > AnonymousIdentificationModule.ClearAnonymousIdentifier();

>
> > Could someone help me to solve this?

>
> > Thanks,

>
> > Miguel

>
> Please, anyone?
>
> Thank You,
> Miguel


Please, could someone advice me on this?

Thanks,
Miguel
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get anonymous user shapper Microsoft ASP .NET 1 14th Nov 2008 07:08 PM
newbie: check if user is a anonymous user Jeff Microsoft ASP .NET 2 10th Jul 2006 12:02 AM
How do I create a form that allows for anonymous submission? =?Utf-8?B?Q2F0c2tpbGxFYWdsZQ==?= Microsoft Frontpage 2 5th Apr 2006 05:17 PM
Need tech advice on anonymous emailing Anonymous Freeware 1 8th Feb 2006 05:30 PM
anonymous user gone =?Utf-8?B?U3RhY3k=?= Microsoft Outlook Installation 0 13th Jan 2005 02:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:34 AM.