I created an empty project in VS2013 and added these packages:
DotNetOpenAuth.AspNet
Microsoft.AspNet.Providers.Core
Microsoft.AspNet.Providers.LocalDb
Microsoft.AspNet.Membership.OpenAuth
In the process, Entity Framework 5 was added to the project. I manually installed EF6 and now I get this error when I try to authenticate a user with an external provider:
"Method not found: 'System.Data.Objects.ObjectContext System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()'."
I checked the DNOA documentation but it does not say a word about dependencies/requisites.
Does anybody know if DotNetOpenAuth can work with EF6?
DotNetOpenAuth does not have EntityFramework as a dependency. The samples however do use EF. You must have some of your own code that uses entity framework.
That said, it sounds to me like you need to add a binding redirect or jiggle your entityframework configuration a bit in your web.config file.
Related
I have used entity framework 5(ef5) with ado .net entity model for backend purposes. I just changed the project to ef 6 and i build the project it works fine .Now when i update a table using update from table datamodel.context.cs file and datamodel.tt everything related to entity shows error genearting output
I have also checked the packages installed Ef6.01 and EF 6.02 are installed .
I have surfed the net too .Couldnt get any solution .Can anyone please suggest some solution
I think it could be related to my following answer
Here, the problem was that the T4 templates were still from version 5
I'm trying to create a Breeze Web API controller and I'm wondering if it is possible with the default MVC/Web API project template that comes with Visual Studio 2013. Updating everything through the Nuget packet manager installs Entity Framework 6.0.1. Attempting to installing Breeze after that results in an error as it attempts to install EF 5 as a dependency, which is not possible given the fact that other parts of the template depend on EF6.
Do we have to wait for a new version of Breeze that works with EF6?
Edit: I want to do this the "breeze way" using [BreezeController] and Odata.
I just wanted to add that even without EF6.1, the MVC 5 updates released today with VS2013 also break breeze. It's hard to separate the pieces to determine which new piece is responsible. It could be MVC or the new odata. In any case, we anxiously anticipate the new version.
Updated 10/29/13
As of now, Breeze 1.4.5 has support for Microsoft's ASP.NET WebApi 2 and Entity Framework 6. Please see http://www.breezejs.com/documentation/download.
Older post:
We don't yet support EF6 but it is coming ... soon...
There is a new package called Breeze.WebApi2 that is compatible with Web API2 and EntityFramework 6. It makes some of the existing Breeze packages obsolete. See http://www.breezejs.com/documentation/start-nuget for details.
I am building a solution with the following Projects:
Main.Data - Class Library project
Main.API - Asp.NET MVC WebApi - references Main.Data
Main - Asp.NET MVC 4 web application - references Main.API
I have a MyContext : DbContext class located inside Main.Data project.
I have also successfully issues enable-migrationsconsole command on Main.Data project, and I am successfully using LocalDB as an SQL server for my data and for upgrade-database migrations.
The problem starts when I am trying to publish Main project to Windows Azure website.
The Publish Profile that is automatically created using Import from a Windows Azure web site does not seems to recognize that I am using Entity Framework Code First solution, and so I can't enable Execute Code First Migrations as I would like to. Instead, I can only enable Update database scripts.
I am using Visual Studio 2012 with Entity Framework 5.0.0 (Since the beginning of the project).
Just to verify, I have tried to add a temporary MyContext class inside the Main Project and to enable-migrations on the Main project, and after that my Publish Profile automatically detected Entity Framework Code-First.
That is, of-course, not a solution (or is it?)
Here are some relevant threads:
This is the base learning tutorial.
This explains deployment options, but no troubleshooting.
This actually gives a few ideas to try, but all seems unnatural.
I am looking for a clean stable solution. Do I have to put my Context class inside the Main Project?
Thanks in advance
I can now enable Execute Code First Migrations when I create a publish profile.
Here is what I did to achieve it:
Inside Main/Web.config I changed the name of the connection string to the FQN of the context class: Main.Data.MyContext.
Add a reference from Main project to Main.Data Project (which was not needed until now).
This does the job for me.If anyone got a better or more educating answer, I would be happy to hear it.
I have a web app running ASP.NET MVC 2 along with other sites (using ASP.NET MVC 4), updated IIS7 to use .NET 4.5 and my MVC2 app stop working properly:
Issue: (blocker)
There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
the solution:
comment out a section of web.config, based on http://forums.asp.net/p/1571308/3939106.aspx:
Issue: (blocker)
Login stop working, the solution add this line <machineKey validation="SHA1"/> to web.config, based on Login fails after upgrade to ASP.net 4.0 from 3.5:
Issue:
One of the views is giving a Compilation Error:
CS0104: 'ContainerType' is an ambiguous reference between
'System.Web.DynamicData.ContainerType' and
'MVFleet2.Core.ContainerType'
on this line :
<%foreach (var specs in (List<ContainerType>)ViewData["ContainerTypes"])
This error never happened before the update, I know the obvious solution is to use the full name for the cast, but I'm looking for a solution so i can force the web app to run in the context of .NET 3.5 and bypass this issues, so i don't have to deal with this and probably more issues in the future... is this possible?
If you want to use the older version of the framework (.net 3.5), you need to change the Application Pool in IIS to run as .Net 2.0.
You should fully qualify the ContainerType type definition to MVFleet2.Core.ContainerType.ContainerType.
I followed the simple tutorial # http://www.devart.com/dotconnect/oracle/articles/Tutorial_EF.html
(Which works perfectly, btw) combined with http://www.hanselman.com/blog/CreatingAnODataAPIForStackOverflowIncludingXMLAndJSONIn30Minutes.aspx for the OData part and now I need to deploy it to a server.
The problem I am having is that in step 4 of the devart tutorial, I chose a "Data Connection" to my database. Everything works fine on my dev box, but when I published the EF project, there was no reference to the DevArt dlls in the project. So, none were moved to the server.
And, of course this is producing a 'Unable to find the requested .Net Framework Data Provider. It may not be installed.'.
I tried just copying the dlls into the bin directory and I installed the devart product on the server. Neither worked.
I am used to ASP.Net applications that reference the needed Data dlls. What do I need to do to get my EF Odata service running?
The following page will explain how to deploy your EF devart project:
DevArt - Deployment