April 3, 2009 at 7:18 am
I am trying to connect to my asp.net *.mdf databases which are in the C:/**/**/App_Data folder. This is on a virtual dedicated server running MSServer2003. The SQL MS Object Explorer does not list this folder or the databases I want. The directory tree goes something like this. *WEB\SQLEXPRESS (SQLServer 10.0.1600 - *WEB\unsername >Databases >System Databases >master, model, msdb, tempdb. No App_Data folder and no sign of the website the database files are nested in. This is a fresh install of SQL 2008 Express and MS VS 2008 (Web Developer) on this virtual dedicated server. I can see and work with the databases with Visual Studio on the server, and I can even connect one of the databases. But when I try to use aspnet_regsql to setup asp.net security I get a cannot connect to SQL server error.
April 4, 2009 at 10:18 am
Are you sure that you can connect to the same instance while you are in VS 2008? If the Object Explorer does not list those databases, it probably means they aren't attached to SQL Server, as you mentioned it's a fresh installation.
The *.mdf files are just data files which SQL Server uses to store the information about the objects and data within the objects. To be able to see those databases, you have attach the *.mdf file using "Attach Method".
Go to Object Explorer > Right Click on Databases > Select "Attach..."
--Ramesh
April 4, 2009 at 10:42 am
Oddly, I have no problem seeing and attaching with VS, but the new install of SQL Man Stud just will not even see them. Both apps are on the same machine.
April 4, 2009 at 11:22 am
In the App_Data folder I think VWD creates a user instance and I think aspnet_reqsql uses Server instance so you have to either connect your user instance to management studio manually or create a new database for Asp.net membership. Check below for how to connect user instance to management studio.
Kind regards,
Gift Peddie
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply