我有Visual Studio 2008和Installed MVC2 RTM。 對於數據的基礎上我了SQL Server 2008從註冊頁面創建用戶時,asp.net mvc無法連接到SqlServer
當我第一次創建類型「asp.net MVC Web應用程序」 的一個項目,我拿到項目和app_data文件的默認結構。 當我運行該項目並嘗試註冊一個新用戶它給出了以下錯誤。
The user instance login flag is not supported on this version of SQL Server. The connection will be closed.
顯示上述消息,而連接字符串值是
<connectionStrings>
<add name="ApplicationServices" connectionString="data source=.;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
</connectionStrings>
我發現了下面的錯誤時數據源= \ SQLEXPRESS
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
任何想法,爲什麼它沒有連接到數據庫?
在此先感謝。
http://stackoverflow.com/questions/3277866/asp-net-website-administration-tool-unable-to-connect-to-sql-server-database你可以找到解決方案在這裏。 –