I am doing a CustomProfile for a web project and so far I had managed until now. I used this guide: http://msdn.microsoft.com/en-us/magazine/cc163457.aspx and followed it. My project is VB.NET so I followed the instructions for C# files. I created a custom table, adjusted it to my needs and I am facing two problems.
    Sub SiteCreateUserWizard_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim UserProfile As ProfileCommon = Profile.GetProfile(SiteCreateUserWizard.UserName)
    UserProfile.FirstName = FirstNameTextBox.Text
    UserProfile.LastName = LastNameTextBox.Text
    UserProfile.Branch = branch.SelectedValue
    UserProfile.ProfileVersion = Microsoft.Samples.SqlTableProfileProvider.ProfileVersion
    UserProfile.Save()
End Sub
The UserProfile.ProfileVersion line is giving me an error. "Error 7 'ProfileVersion' is not a member of 'ProfileCommon'" and "Error 8 'ProfileVersion' is not a member of 'Microsoft.Samples.SqlTableProfileProvider'."
If I comment this line it works to a certain degree. As soon as I try to register an user it gives me the following error: Parser Error Message: Unrecognized config attribute:profileVersion. This is my webconfig file....
    <profile defaultProvider="MyCustomProfileProvider">
  <providers>
    <add name="MyCustomProfileProvider" type="Microsoft.Samples.SqlTableProfileProvider" connectionStringName="LocalSqlServer" table="CustomProfile" applicationName="/"  profileVersion="1" />
  </providers>
  <properties>
    <add name="FirstName" type="string" defaultValue="[null]" customProviderData="FirstName;nvarchar" />
    <add name="LastName" type="string" defaultValue="[null]" customProviderData="LastName;nvarchar" />
    <add name="MaternallastName" type="string" defaultValue="[null]" customProviderData="MaternalLastName;nvarchar" />
    <add name="Branch" type="string" defaultValue="[null]" customProviderData="Branch;nvarchar" />
  </properties>
If I take out the ProfileVersion it doesn't even work. Any suggestions are gladly welcome. I've been stuck on this half the day, heh.
</profile>