Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9013619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:18:48+00:00 2026-06-16T03:18:48+00:00

Have created a web application with Ninject and .Net 4 (have tested both 4.0

  • 0

Have created a web application with Ninject and .Net 4 (have tested both 4.0 and 4.5) intended for Azure. The application has been tested ok on Azure before adding database support to it. Locally it runs ok with database support on SQL Express. But when altering the connect string to the Azure one and deployes it, I get the following error message.

I do NOT have a parameterless constructor in the controller, as I understand that Ninject needs one which is parameterized to work.

Azure administrative console indicates successfull connections to database.

Can anyone give me a hint for what might be wrong? I have to admit that I am new to both Azure and Ninject, this is my training project 🙂

[NotSupportedException: Model compatibility cannot be checked because the database does not contain model metadata. Model compatibility can only be checked for databases created using Code First or Code First Migrations.]

System.Data.Entity.Internal.ModelCompatibilityChecker.CompatibleWithModel(InternalContext internalContext, ModelHashCalculator modelHashCalculator, Boolean throwIfNoMetadata) +221
System.Data.Entity.DropCreateDatabaseIfModelChanges`1.InitializeDatabase(TContext context) +218
System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) +66
System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() +225
System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) +208
System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) +235
System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes() +65

System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext() +36
STT.data.Repository.UnitOfWork..ctor(IDatabaseFactory databaseFactory) +88
DynamicInjector34635b924a6c4e6ab03c67010341a739(Object[] ) +92
Ninject.Activation.Context.Resolve() +294
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +248
System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +300
System.Linq.WhereSelectArrayIterator`2.MoveNext() +82
System.Linq.Buffer`1..ctor(IEnumerable`1 source) +520
System.Linq.Enumerable.ToArray(IEnumerable`1 source) +103
Ninject.Activation.Providers.StandardProvider.Create(IContext context) +480
Ninject.Activation.Context.Resolve() +294
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +248
System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +300
System.Linq.WhereSelectArrayIterator`2.MoveNext() +82
System.Linq.Buffer`1..ctor(IEnumerable`1 source) +520
System.Linq.Enumerable.ToArray(IEnumerable`1 source) +103
Ninject.Activation.Providers.StandardProvider.Create(IContext context) +480
Ninject.Activation.Context.Resolve() +294
System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +248
System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +300
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +78

[InvalidOperationException: An error occurred when trying to create a controller of type 'STT.web.Controllers.HomeController'. Make sure that the controller has a parameterless public constructor.]
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +256
System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +81
System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +270
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +86

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +12551795
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:18:49+00:00Added an answer on June 16, 2026 at 3:18 am

    Looks like an issue with EF.

    NotSupportedException: Model compatibility cannot be checked because the database does not contain model metadata. Model compatibility can only be checked for databases created using Code First or Code First Migrations.

    EF 4 Code First: Model compatibility cannot be checked because the EdmMetadata type was not included in the model

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an ASP.Net MVC Web Application and used NuGet to install Ninject
I have created a Visual Studio 2010 ASP.NET Web Application. With it I have
I have created a Visual Studio 2010 ASP.NET Web Application. I've noticed that if
I have created blank Asp.Net-MVC 3 web application and want to write my own
I have the following scenario. I have created an ASP.NET web application (framework 3.5)
i have created one web application in asp.net[.net 4 framework and visual studio 2010].Now
I have created a web application using ext.net and c# in visual studio 2010.
I have a web application that uses .NET Framework 4, MVC 4, Ninject 3.
I have created an ASP.NET Webforms web application which basically inetracts with the code
I have created a web application using ASP.NET MVC3, and want to display a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.