Unable to retrieve metadata

Unable to retrieve metadata

Postby gilberto_pavanelli » Mon 08 Sep 2014 12:27

Hello,

I was using dotconnect for oracle trial last week.

I connect via server explorer using devart connection, created edmx entity framework file, everything fine.

Now my client just bought the professional version, and i reinstall and update references to the new licensed version.

But i am still facing some trouble to scaffolding views in MVC5/EF6 Project.

Unable to retrieve metadata, every single time.

Here is my web.config file.

<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=301880
-->
<configuration>
<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=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="Workaround" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=MvcMusicStore;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\MvcMusicStore.mdf"
providerName="System.Data.SqlClient" />
<add name="DefaultConnection" connectionString="DATA SOURCE=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = myserver.com.br)(PORT = 1521))(CONNECT_DATA =(SERVICE_NAME = ORACLE)));User ID=adl;Password=password;"
providerName="Devart.Data.Oracle" />
<add name="Entities" connectionString="metadata=res://*/Models.Modelo.csdl|res://*/Models.Modelo.ssdl|res://*/Models.Modelo.msl;provider=Devart.Data.Oracle;provider connection string=&quot;DATA SOURCE=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = myserver.com.br)(PORT = 1521))(CONNECT_DATA =(SERVICE_NAME = ORACLE)));User ID=adl;Password=password;&quot;"
providerName="System.Data.EntityClient" />
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<authentication mode="None" />
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
<customErrors mode="Off"/>
<!--<authorization>
<deny users="?"/>
</authorization>-->
</system.web>
<system.webServer>
<modules>
<remove name="FormsAuthentication" />
</modules>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-5.2.0.0" newVersion="5.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="Devart.Data.Oracle.Entity" type="Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity, Version=8.4.239.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<add name="dotConnect for Oracle" invariant="Devart.Data.Oracle" description="Devart dotConnect for Oracle" type="Devart.Data.Oracle.OracleProviderFactory, Devart.Data.Oracle, Version=8.4.239.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
</DbProviderFactories>
</system.data>
</configuration>

Any help would be appreciate.

Thanks anyway

Gilberto
gilberto_pavanelli
 
Posts: 7
Joined: Mon 08 Sep 2014 12:19

Re: Unable to retrieve metadata

Postby gilberto_pavanelli » Mon 08 Sep 2014 12:54

By the way i am using VS 2013 Update 3

Thanks again
gilberto_pavanelli
 
Posts: 7
Joined: Mon 08 Sep 2014 12:19

Re: Unable to retrieve metadata

Postby gilberto_pavanelli » Mon 08 Sep 2014 14:04

DevArt Team

Despite of my bad english, sorry about that.

But, i am relying on you guys.

Thanks
gilberto_pavanelli
 
Posts: 7
Joined: Mon 08 Sep 2014 12:19

Re: Unable to retrieve metadata

Postby Shalex » Wed 10 Sep 2014 14:30

gilberto_pavanelli wrote:Unable to retrieve metadata, every single time.

Please specify the full call stack of the error with all inner exceptions.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Re: Unable to retrieve metadata

Postby gilberto_pavanelli » Wed 10 Sep 2014 16:18

Hello

Thanks for your reply.

I did mentioned i am getting the error whe i try to generate/scaffolding views in MVC5 Project.

So i am in design mode, no exception or call stack whatsoever, i just receive a message included in image bellow

https://dl.dropboxusercontent.com/u/43265433/Captura%20de%20tela%202014-09-10%2013.10.11.png

At least i dont know to extract the requested details, since i am not runnig or debbuging.

If you want some extra details fell free to ask. Or point me to get that.

Thanks again
gilberto_pavanelli
 
Posts: 7
Joined: Mon 08 Sep 2014 12:19

Re: Unable to retrieve metadata

Postby Shalex » Thu 11 Sep 2014 10:21

The full text of the error on your screenshot is
"There was an error running the selected code generator:
'Unable to retrieve metadata for 'Chat.Models.EMPRESA'. Unable to find
the requested .Net Framework Data Provider. It may not be installed.'
"

From your app.config:
gilberto_pavanelli wrote:<provider invariantName="Devart.Data.Oracle.Entity" type="Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity, Version=8.4.239.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />

The invariantName in your entry is incorrect. It should be "Devart.Data.Oracle":
Code: Select all
<provider invariantName="Devart.Data.Oracle" type="Devart.Data.Oracle.Entity.OracleEntityProviderServices, Devart.Data.Oracle.Entity, Version=8.4.239.6, Culture=neutral, PublicKeyToken=09af7300eec23701" />

For more information, refer to
http://www.devart.com/dotconnect/oracle/docs/EF.html#dataprovideref6
http://www.devart.com/dotconnect/oracle/docs/?deployment.html
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Re: Unable to retrieve metadata

Postby gilberto_pavanelli » Thu 11 Sep 2014 14:40

Same error as you can see in this image bellow.

https://dl.dropboxusercontent.com/u/43265433/Captura%20de%20tela%202014-09-11%2011.29.06.png

What's kinda weird to me is why the process of generating views, demand more than generate/update the whole edmx file.

Thanks again
gilberto_pavanelli
 
Posts: 7
Joined: Mon 08 Sep 2014 12:19

Re: Unable to retrieve metadata

Postby Shalex » Fri 12 Sep 2014 16:24

1. Is dotConnect for Oracle installed on the workstation where you are compiling and running your project? If yes, add
Code: Select all
   <remove invariant="Devart.Data.Oracle" />
before registration of "Devart.Data.Oracle" in the <DbProviderFactories> section.

2. Rebuild the project after updating your web.config.

3. If nothing helps, send us a test project so that we can reproduce the issue in our environment.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Re: Unable to retrieve metadata

Postby gilberto_pavanelli » Fri 12 Sep 2014 16:47

Hello

I have the dot connect installed on that workstation, and following your instructions we are back in track.

Thanks so much, you rocks
gilberto_pavanelli
 
Posts: 7
Joined: Mon 08 Sep 2014 12:19


Return to dotConnect for Oracle