Asp.net MVC webmatrix membershipprovider kicking in

after switching from mvc2 - mvc3 with minor problems ... When calling Membership.GetAllUsers

The following problem occurs:

it seems that instead of System.Web.Security.SqlMembershipProvider WebMatrix.WebData.SimpleMembershipProvider kicks. I use WebMatrix to get razor assistants to work with MVC3. I tried a bunch of things, but to no avail.

The IIS7 administration configuration looks like this:

<trustedProviders allowUntrustedProviders="false"> <add type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <add type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <add type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </trustedProviders> 

[NotSupportedException: the specified method is not supported.] WebMatrix.WebData.SimpleMembershipProvider.GetAllUsers (Int32 pageIndex, Int32 pageSize, Int32 & totalRecords) +28 System.Web.Security.Membership.GetAllUsers (Int32 pageIndex, Int32 pageize 45

+4
source share
3 answers

An error occurred in ASP.NET MVC 3 Beta where some additional features were enabled by mistake. There are some configuration settings to disable them, but they are no longer needed.

In ASP.NET MVC 3 RC (which was released earlier this week) they all need to be fixed. You want to make sure that in your web.config files and project links you are not referencing any of the "WebMatrix" DLLs.

+2
source

How about your web.config, specifically the system.web.membership section?

 <system.web> <membership> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers> </membership> <system.web> 
0
source

solution found. It seems that changing the defaultProvider parameter to another parameter is the solution. I believe that WebMatrix was a register using "AspNetSqlMembershipProvider" as its name -> but unfortunately

 <membership defaultProvider="SQL"> <providers> <clear /> <add name="SQL" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="images" passwordFormat="Clear" /> </providers> </membership> 
0
source

All Articles