Connection string problem with New ASP.Net Website template
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?
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.
精彩评论