1
votes

I am trying to set up the membership provider. I have used the ASP.Net Web Site Administration and set up (1) access from the internet, (2) roles (3) several users and (4) access roles. I then closed the link and went back to my application and expected find a SQL database named I'm sorry, I think I'm expecting a DB named ASPNETDB.mdf, but it wasn't set up. I though this happened automatically. How do I get the database for the membership orovider created?

Thanks in advance!

2

2 Answers

1
votes

You need to execute the aspnet_regsql.exe to create the database for the default providers.

Check this link:

http://msdn.microsoft.com/en-us/library/ms229862(v=vs.80).aspx

0
votes

As an alternate to running aspnet_regsql you can pull down the universal providers from nuget. These providers will automatically create tables you need if they dont exist with the benefit of being SQL CE and SQL Azure ready.

http://www.hanselman.com/blog/IntroducingSystemWebProvidersASPNETUniversalProvidersForSessionMembershipRolesAndUserProfileOnSQLCompactAndSQLAzure.aspx

http://nuget.org/List/Packages/System.Web.Providers