I tried to develop custom membership provider in order to use with my own database tables but I couldn’t. After run project I saw red error line on web.config custom membership provider line. 🙁
type="Mvc4ApplicationTest2.Models.CustomMembershipProvider" I found article that said me to add below lines to web.config and I did.
add key="enableSimpleMembership" value="false"
add key="autoFormsAuthentication" value="false"
Now application run 🙂 but after get to login page and clicked on submit i get to new error that hint me like this:
To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider".
Again I searched and I found some articles says me have to add prior line to web.config but with true value !!? add key="enableSimpleMembership" value="true"
I confused. ?(
So What can I do? Can everyone please help me?
and other question, I want to use the standard, strong and useful method to secure my web application. do you think if I must use websecurity classes or other approach?
Sincerely
Ali
After searching a lot and reading many articles I found it Finally. That is stupid mistake. I used to inherit from System.Web.Security.MembershipProvider. so I took error about needing ExtendedMembershipProvider implementation. So I did it with WebMatrix.WebData.ExtendedMembershipProvider and then every things were fine. Thanks for all advises and helps.