views:

16

answers:

1

Hi,

This is the connection string that gets generated with the "New ASP.Net Website" template in vs 2010

<connectionStrings>
<add name="ApplicationServices"
     connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
     providerName="System.Data.SqlClient" />

I have a named instance of sql 2008 developer edition installed. I have changed the Server name but the query string will still not work. I want to be able to use the default db "aspnetdb.mdf". I use Windows authentication to connect. How can i change the connection string to get this to work?

A: 

Attaching to a database via AttachDBFilename is only possible when you use one of the Express editions of the product. So it won't work on the developer edition.

Since user instances will be removed in a future version of SQL Server, you probably shouldn't use this.

Ronald Wildenberg