Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I was also playing around this a bit and looking into the WebMatrix code and finally I think that Ben's solution seems to be the working one. </p> <p>(I have also tried to play with the assembly references without success. I think with removing the references you just achieved the same as the config settings does - the WebMatrix security was not properly initialized. But I think this is quite a dangerous way. But I'm just guessing here.)</p> <p>So for me what worked: </p> <pre><code>&lt;appSettings&gt; &lt;add key="enableSimpleMembership" value="false"/&gt; &lt;/appSettings&gt; &lt;membership defaultProvider="MyMembershipProvider"&gt; &lt;providers&gt; &lt;clear /&gt; &lt;add name="MyMembershipProvider" type="MyNamespace.MyMembershipProvider" /&gt; &lt;/providers&gt; &lt;/membership&gt; &lt;!-- this role configuration below uses the SimpleRoleProvider, because I just wanted to replace the membership provider. If you need to replace that one too, just use your own class instead. --&gt; &lt;roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider"&gt; &lt;providers&gt; &lt;remove name="AspNetSqlRoleProvider" /&gt; &lt;add name="AspNetSqlRoleProvider" type="WebMatrix.WebData.SimpleRoleProvider, WebMatrix.WebData, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt; &lt;!-- note: WebMatrix registers SimpleRoleProvider with name 'AspNetSqlRoleProvider'. I don't know why but i kept it. --&gt; &lt;/providers&gt; &lt;/roleManager&gt; </code></pre> <p>I have checked the WebMatrix code, and it seems that setting 'enableSimpleMembership' to false is quite harmless. WebMatrix only uses it to initialize the membership/role providers (that can be substituted by the config above) and it enables the forms authentication allowing an alternative configuration way (through app settings) - this is also not necessary, if you have the standard forms authentication properly configured (mainly the 'loginUrl' is the only important player here). </p> <p>I have also tried to check what the 'autoFormsAuthentication' setting does - but I haven't found anything, so just skipped it. Looks fine still.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload