Problem casting to strongly typed member in Umbraco9
Hi.
I have a weird one I can't quite identify:
I have a custom member type called 'Shop Member', and I have a models builder generated class for this ShopMember.
Then I have the following code:
var identity = await _memberManager.GetCurrentMemberAsync();
var shopMember = _memberManager.AsPublishedMember(identity) as ShopMember;
Locally on my dev environment this works completely fine. I get my member identity, I get the published content and I can cast it.
On the server where it's deployed, I cannot cast to ShopMember (I've tried to do a direct cast as well, and get the invalid cast exception)
If I don't cast, I can see that the Content Type for my member is my 'Shop Member' content type, and I can access the properties and get the values. I just can't cast it to the strongly typed version.
If anybody has ideas/experienced something similar, I'd be very glad for information :)
Problem casting to strongly typed member in Umbraco9
Hi.
I have a weird one I can't quite identify:
I have a custom member type called 'Shop Member', and I have a models builder generated class for this ShopMember.
Then I have the following code:
Locally on my dev environment this works completely fine. I get my member identity, I get the published content and I can cast it.
On the server where it's deployed, I cannot cast to ShopMember (I've tried to do a direct cast as well, and get the invalid cast exception)
If I don't cast, I can see that the Content Type for my member is my 'Shop Member' content type, and I can access the properties and get the values. I just can't cast it to the strongly typed version.
If anybody has ideas/experienced something similar, I'd be very glad for information :)
Thanks in advance.
is working on a reply...