An exception of type 'System.Data.SqlClient.SqlException' occurred in EntityFramework.dll but was not handled in user codeMySqlを使用しているときにSQL Serverの接続エラーが発生するのはなぜですか?
Additional information: 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)
web.config
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<connectionStrings>
<add name="WebFront" connectionString="Server=localhost;Database=webfront;Uid=devadmin;Pwd=*******" providerName="MySql.Data.MySqlClient" />
</connectionStrings>
...
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>
<entityFramework>
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
</provider>
</providers>
</entityFramework>
すべては私のユニットテストから細かい接続されています。これは、接続文字列内にあるもの以外の認証を提供していない可能性がありますか?サイトに何か他のものがありますか? Owin、Identity、何も使っていない。すべての鐘や笛に追加する前に、基本的なものを学ぼうとしています。
これは、単にマシンがサーバーに接続できないことを意味します。 – Mairaj
ご使用のマシンがDBが存在するサーバーにアクセスできることを確認してください。 – Mairaj
それは同じマシン上にあります... localhostを実行している、ローカルのIIS express、VS2015からすべて。 – IAbstract