Hi,
We’re migrating several apps done by consultants in 2013 from .Net Framework 4.0/MVC 4 to 4.5.2/MVC5 and Oracle 12c for Preservation on newer Win2012 Servers.
- All apps were developed in VS2010 on Win 7 with Oracle 11g via EF 4
- We are assuming/hoping after updating one the others will be streamlined. The first is always the most difficult.
- We assume migrating with the latest Visual Studio (VS2017 Pro and tools/updated packages) would smooth the process.
- VS2017 prompted us to update several Nuget packages including Entity Frameworks (up to 6.x).
- I eventually had to downgrade to EF 5.0 to get the EF Database Wizard to connect to the database and recreate the model.
- We have the current set of Oracle Developer Tools for VS 2017 installed.
- I've updated the project to MVC5 (I think...) This was the only option in Nuget.
- I’ve seen the instructions Here (for EF6) but it doesn’t seem to apply to our approach and I'm not sure how this works with just EF5.
The app compiles and logs the user in however anything reading data gets this error in the web.config file. However, it looks more of a driver/provider setup issue. Any ideas or
things to try might help? I’ve been all over the web with this?
Inner
Exception 1:
ConfigurationErrorsException:
Unrecognized element 'providers'.
Name | Value | Type |
◢ | InnerException | {"Unrecognized element 'providers'. (C:\\Workspace\\MaintenaceRadioLog\\MaintenaceRadioLog\\web.config line 193)"} | - System.Exception
{System.Configuration.ConfigurationErrorsException}
|
<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=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</configSections>
<connectionStrings>
<add name="ADConnectionString" connectionString="LDAP://ad.*" />
<!--Test Config-->
<add name="MaintenanceRadioLogEntities" connectionString="metadata=res://*/MaintenanceRadioLogDataModel.csdl|res://*/MaintenanceRadioLogDataModel.ssdl|res://*/MaintenanceRadioLogDataModel.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string="DATA SOURCE=*.world;PASSWORD=*;PERSIST SECURITY
INFO=True;USER ID=*"" providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<providers>
<provider invariantName="Oracle.ManagedDataAccess.Client" type="Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices, Oracle.ManagedDataAccess.EntityFramework"/>
<!--, Version=4.122.18.3, Culture=neutral, PublicKeyToken=89b483f429c47342" />-->
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v12.0" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
Tim Marciniak
ITS4 | Business Solution