App_Data database files not shown in Object Explorer

  • 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.

  • 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


  • 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.

  • 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.

    http://blogs.msdn.com/sqlexpress/archive/2006/11/22/connecting-to-sql-express-user-instances-in-management-studio.aspx

    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