2012-08-07

I've created a local .mdf database with Visual Studio 2010 and did a couple of modifications to it. Now I want to edit it in IIS Manager. However, I cannot access it neither by connection string, nor by direct specification.

First. I copied a connection string from Visual Studio 2010 properties window for the DB, it was like Data Source=.\SQLEXPRESS;AttachDbFilename=o:\...\MyDB.mdf;Integrated Security=True;User Instance=True. I went to IIS Manager -> Connection Strings -> Add -> Custom and pasted it. Then went to IIS Manager -> Database Manager -> MyDB, it opened, but there were no visible contents while I've added several tables.

Second. I used "Add Connection" in Database Manager and specified properties like following:

Database provider == SQL Server 2008

Server == localhost

Database == o:...\MyDB.mdf

User ID == my_local_user_name

But when I accessed newly created connection, I got the following error:

There was an error while performing this operation. Details:

A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Same if I set Server field to SQLEXPRESS. Any ideas?

Windows 7 x64 Ultimate

Microsoft SQL Server 2008 x64

Visual Studio 2010 Professional SP1

IIS Manager x64

Show more