سؤال

I have got a custom membership provider to work with ASP.NET MVC 4 but when i whant to use the OAuth logins like Facebook etc I'm getting an error:

To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider".

This happening when calling the function OAuthWebSecurity.Login in the ExternalLoginCallback actionresult.

I guess to get all to work I need a custom "ExtendedMembershipProvider" but I can not find any information about it, any ideas?

هل كانت مفيدة؟

المحلول

WebMatrix.WebData.ExtendedMembershipProvider class

Inherit your custom membership provider from it and implement all members you need.

نصائح أخرى

here is the sample of using ExtendedMembershipProvider https://github.com/mazhekin/MVC4CustomMembershipSolution

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top