Membershipprovider

Vote:
 

When using the WindowsMembershipProvider and WindowsRoleProvider, the create user and create group functionallity is dissabled in EPiServer admin mode.

 How is this implemented? In my project an external consultant has written custom membership and roleproviders but all they do is throw an exception if you try to create a new user (users are handled in an external tool). We would like to have the same clean solution as windows providers.

 /Jens

#25348
Oct 22, 2008 10:34
Vote:
 

There is a class ProviderCapabilities in namespace EPiServer.Security that has a static method AddProvider. This is how EPiServer CMS knows what a provider is capable of.

For example:

ProviderCapabilities.AddProvider(typeof(WindowsMembershipProvider), new ProviderCapabilitySettings(0, "email")); ProviderCapabilities.AddProvider(typeof(WindowsRoleProvider), new ProviderCapabilitySettings(0));

Fredrik also has a blog post on the subject.

#25352
Oct 22, 2008 11:31
Vote:
 

Tack för hjälpen!

Fungerade perfekt och var precis vad jag var ut efter.

 /Jens

#25355
Oct 22, 2008 13:43
Vote:
 

Tack och bock!
Fick ett fel på "mina inställningar" för min custom provider som var relaterat till detta. EPiServer försökte uppdatera inställningar mha min provider och kastar istället ett exception "Unexpected Provider error! This may be caused by invalid combination of Role and Membership providers."

Så får ni detta fel och har implementerat en egen provider så dubbelkolla att ni har ovanstående rader.

#28471
Mar 10, 2009 11:17