0

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?

Ruben Ravnå
  • 659
  • 7
  • 17

1 Answers1

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

You may specify the default one.

Rui Lima
  • 7,185
  • 4
  • 31
  • 42
  • I'm sorry, I don't think my provider is working right now, can I just; – Ruben Ravnå Oct 23 '12 at 09:41
  • Sorry, I don't quite understand what you need. You don't need the Membership in you application? – Rui Lima Oct 23 '12 at 09:44
  • see if this help you: http://madskristensen.net/post/XML-membership-provider-for-ASPNET-20.aspx – Rui Lima Oct 23 '12 at 09:47
  • Well i don't need anything. I have userdata in web.config as seen above. So I only want to logg inn to these. But the application also want an membership provider. So I don't understand why I need to write one, when I don't need to use it? – Ruben Ravnå Oct 23 '12 at 09:49
  • But how does the application know the users? How does the application knows if the logged user is Skift-a ? My advice would be to use the XML implementation on the link I sent before. Or create your own membership provider. Have you tried to remove the section? – Rui Lima Oct 23 '12 at 15:16
  • see this : http://vishalnayan.wordpress.com/2011/03/22/creating-credential-store-for-form-authentication-in-asp-net-3-5/ – Rui Lima Oct 23 '12 at 15:19
  • from here: http://p2p.wrox.com/asp-net-1-1/17926-forms-authentication-credentials.html – Rui Lima Oct 23 '12 at 15:22