我将 Code First EF 与 Oracle ODP.Net 一起使用,并尝试通过 VS2012 中的“EF Powertools Beta 3”重新生成视图。
我最近开始在视图生成上遇到以前没有的错误,所以我猜我有一些配置错误,因为错误与 SQL Server 而不是 Oracle 有关。
完整的错误如下:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --->
System.Data.ProviderIncompatibleException: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct. --->
System.Data.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string. --->
System.Data.SqlClient.SqlException: 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)
我当前的 app.config 是:
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<dataConfiguration defaultDatabase="STD" />
<connectionStrings>
<add name="STD" connectionString="Data Source=localhost:1521/ora10g01;Persist Security Info=false;User ID=user;Password=pass;Connection Timeout=30;Decr Pool Size=1;Incr Pool Size=5;Min Pool Size=1;Max Pool Size=20;Pooling=true;" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="STDConnectionFactory, STD.DataAccess">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
</configuration>
有谁知道我错了什么配置?