I am using DOT NET 4 and VB.NET in a web application.
I have created all the SQL membership tables etc.. by using aspnet_regsql.exe
I can login, add user, delete users add roles etc...
Now I am trying to use the profile table to add some fields I need to be added to the newly created user upon registration.
in my web config I now have this
<profile defaultProvider="MyProfileProvider" >
<providers>
<clear />
<add name="MyProfileProvider"
connectionStringName="DbConnString"
applicationName="/"
type="System.Web.Profile.SqlProfileProvider"/>
</providers>
<properties>
<add name="OrganizationId" allowAnonymous="false" type="System.Int16" />
</properties>
</profile>
however I cannot figure out now how to use it. If from my code i try Profile.OrganizationId
this is not part of the profile object.
if I try HttpContext.Current.Profile.SetPropertyValue("OrganizationId", OrgId)
it works.
There is a simple way to access the Profile methods?
Also.. although I can see the property value in the aspnet_Profile table set to 115, when I try to get the value by HttpContext.Current.Profile.GetPropertyValue("OrganizationId")
I get 0 as result ???
nobody has any idea on this ?