简体   繁体   中英

ASP.Net Members in web.config remove provider

I'm trying to avoid the ASPNETDB.mdf file to be added to my project.

I have this in my config file:

<authentication mode="Forms">
  <forms loginUrl="login.aspx" defaultUrl="Default.aspx" protection="All">
    <credentials passwordFormat="Clear">
      <user name="admin" password="Qwe456"/>
      <user name="Murergruppe" password="2012m"/>
      <user name="Skift-a" password="2012a"/>
      <user name="Skift-b" password="2012b"/>
      <user name="Skift-c" password="2012c"/>
      <user name="Skift-d" password="2012d"/>
      <user name="Skift-e" password="2012e"/>
    </credentials>
  </forms>
</authentication>

Then i've turned of the creation of ASPNETDB.mdf in machine.config

then it says it can't find the file. then I add:

<membership>
  <providers>
    <clear />
    <add type="Personal.Providers.WebConfigMembershipProvider" name="WebConfigMembershipProvider"/> 
  </providers>
</membership>

But then it says the default provider must be specified. What to do when i don't have any other providers?

 <membership defaultProvider="WebConfigMembershipProvider" userIsOnlineTimeWindow="20">
   <providers>
.....

You may specify the default one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM