Extra Method

Jan 11, 2008 at 2:22 PM
Hi,
Could you modify WebProfile Generator to create the following method

public virtual WebProfile GetProfile(string username, bool authenticated)
{
return new WebProfile(System.Web.Profile.ProfileBase.Create(username, authenticated));
}

I am doing

public void Profile_OnMigrateAnonymous(Object sender,
ProfileMigrateEventArgs args)
{
WebProfile Profile = new WebProfile(Context.Profile);
// get the anonymous user's profile
WebProfile anonymousProfile = Profile.GetProfile(args.AnonymousID);

which always returns an uninitialised anonymousProfile.
I tried doing anonymousProfile.Initialize(args.AnonymousID, false);
but this doesn't work.
The only thing that does work is
WebProfile anonymousProfile = Profile.GetProfile(args.AnonymousID, false);
but this means manualy editing the WebProfile.cs file :-(

I am using the XmlProvider Library 1.0.0.5a

TIA Chris
Feb 3, 2008 at 8:40 PM
Chris,
This method has been added in an upgraded solution called Web Profile Builder.
http://weblogs.asp.net/joewrobel/archive/2008/02/03/web-profile-builder-for-web-application-projects.aspx
Aug 29, 2010 at 1:30 PM

I tried using it with Visual Studio 2010. But it failed. Could you fix it for VS 2010 ?

Thanks 

Kunal Jain