asp.net mvc 4 - Default Role Provider could not be found when using SimpleMembershipProvider -
i'm trying authorization working on asp.net mvc4, try use websecurity.
websecurity.initializedatabaseconnection("tradefairindia", "users", "id", "username", false);
i've put global.asax, , error comes, "default role provider not found".
on internet read had add line of code web.config <rolemanager enabled="true" defaultprovider="aspnetsqlroleprovider">
. had added because of previous errors.
how can resolve problem??
edit:
when change defaultprovider="simpleroleprovider"
gives me new error. says
the type or namespace name 'data' not exist in namespace 'webmatrix' (are missing assembly reference?)
i fixed changing defaultprovider
simpleroleprovider
. second error fixed adding webmatrix.data reference, , going property's , put copy local on true. dont know how fixes it, if can elaborate nice.
here web.config bumps same prob:
<system.web> //... <membership defaultprovider="simplemembershipprovider"> <providers> <clear /> <add name="simplemembershipprovider" type="webmatrix.webdata.simplemembershipprovider, webmatrix.webdata" /> </providers> </membership> <rolemanager enabled="true" defaultprovider="simpleroleprovider"> <providers> <clear /> <add name="simpleroleprovider" type="webmatrix.webdata.simpleroleprovider, webmatrix.webdata" /> </providers> </rolemanager> //... </system.web>
Comments
Post a Comment