tags:

views:

27

answers:

2

I've created a locally attached SQL Server 2008 Express for an ASP.NET MVC application (in App_Data), but I need to access the built-in users table for relationships to custom models that I'm creating. Since the database is local, it doesn't show up when I run aspnet_regsql.exe. Is there a way around this, or should I be setting up the database as a true SQL Server database and providing scripts to generate the tables?

I'm trying to get an environment configured so anyone who checks out the code will have the database automatically, instead of having to spend time configuring it before they can write any code (basically a situation like Rails has where you can have somebody new check out the code, and maybe with some minor configuration type rake db:create and rake db:migrate and have the entire working environment set up.

+1  A: 

If the membership provider is working make sure you have selected 'Show all files' in solution explorer and check the App_Data folder. The DB will probably be called something like ASPNETDB.MDF. ASP.NET / VS has a habbit of setting this database up for you and trying to hide it.

Kim R
Ah yes I had forgotten about "Show all files" - it's been a while since I've used .NET!
Wayne M
+2  A: 

I'd recommend using a SQL Server database and you can then use aspnet_regsql.exe to generate the schema for you.

jamesaharvey
I'm thinking this might be the better approach, and will cause me less hassle than trying to integrate a separate database into the one I plan on using.
Wayne M
The alternative is that I could roll my own login system (I'm used to this from dabbling with Rails) but that seems like a waste overall.
Wayne M