私はASP.Net MVC 4に新しいアプリケーションをデプロイしました。私はSQL Server 2008 R2 SQL Expressではない)。MVC 4でSQL Server Expressデータベースファイルの自動作成エラー - 私はSQL Server Expressを使用したくない
最初の10分間はうまくいきました。その後、コードを少し変更して再デプロイしました。私はない SQL Server Expressを使用して操作を行い、
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)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
SQLExpress database file auto-creation error:
The connection string specifies a local Sql Server Express instance using a database location within the application's App_Data directory. The provider attempted to automatically create the application services database because the provider determined that the database does not exist. The following configuration requirements are necessary to successfully check for existence of the application services database and automatically create the application services database:
しかし:私はSimpleMembershipを使用するページにアクセスしようとするたびに
は今、私はこのエラーを取得します。次のように私のweb.config
では、私はすべての接続文字列を設定しました:
<add name="ApplicationServices"
connectionString="Server=myServer;Database=myDB;User Id=myUserID;Password=myPWD;"
providerName="System.Data.SqlClient" />
<add name="ApplicationServices"
connectionString="Server=myServer;Database=myDB;User Id=myUserID;Password=myPWD;"
providerName="System.Data.SqlClient" />
なぜそれがSQL ServerのEXPRESSデータベースを作成しようとし続けるのでしょうか?
接続文字列名は、データベースコンテキストと同じである必要があります。 http://stackoverflow.com/questions/5346926/code-first-specify-database-name – AaronLS
を参照してください申し訳ありませんが、あなたの問題を誤解している可能性があります。私はまずあなたがEFコードを使用していると仮定しました。 – AaronLS
あなたはこれを解決しましたか?私はまったく同じエラーに直面しています.. – Chatumbabub