I have a sub application set up in the Umbraco folder working OK. I inherit the Membership Role nd Profile settings from the root Umbraco web.config.
If I use razor I can get the User Profile Data no problem, but if I try to get the authenticated users profile in the MVC sub application the profile properties are empty.
I have tried to get them using profle.GetProperty("firstName").Value; same result empty string. I can see all of the Membership properties, but no values.
If someone could give me some idea as to why my sub app can not retrieve the property values I would be very grateful.
if (HttpContext.User.Identity.IsAuthenticated)
{
MembershipUser user = Membership.GetUser(User.Identity.Name);
var member = new Member((int)user.ProviderUserKey);
var fname = profile["firstName"];
var sur = profile["surName"];
var dob = profile["dateOfBirth"];
}
MVC Sub Application, Profiles empty
I have a sub application set up in the Umbraco folder working OK. I inherit the Membership Role nd Profile settings from the root Umbraco web.config.
If I use razor I can get the User Profile Data no problem, but if I try to get the authenticated users profile in the MVC sub application the profile properties are empty.
I have tried to get them using profle.GetProperty("firstName").Value; same result empty string. I can see all of the Membership properties, but no values.
If someone could give me some idea as to why my sub app can not retrieve the property values I would be very grateful.
web.config
is working on a reply...