Remove asp.net membership and roles provider

2020-03-01 03:12发布

For whatever reason, the site I was working on (after a bit of pause) begun screaming about an sql server connection for the asp.net membership. I'm using mysql without asp.net membership so it was weird. However just to be sure I've decided to remove anything related to it, including role providers.

I've added these to the web.config

 <membership>
      <providers>
          <clear />
      </providers>
  </membership>
  <roleManager enabled="false">
      <providers>
          <clear />
      </providers>
  </roleManager>
  <profile enabled="false">
      <providers>
          <clear />
      </providers>
  </profile>

However, it still throws exception: "Configuration Error, Default Role Provider could not be found." . What can I do?

1条回答
Emotional °昔
2楼-- · 2020-03-01 03:41

I think I found what was missing: I had to remove the RoleManager module also.

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
        <remove name="RoleManager" />
    </modules>
</system.webServer>
查看更多
登录 后发表回答