Note that there are some explanatory texts on larger screens.

plurals
  1. POAzure database with Ninject
    primarykey
    data
    text
    <p>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.</p> <p>I do NOT have a parameterless constructor in the controller, as I understand that Ninject needs one which is parameterized to work.</p> <p>Azure administrative console indicates successfull connections to database.</p> <p>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 :-)</p> <pre><code>[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&amp; controller, IControllerFactory&amp; 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&amp; completedSynchronously) +288 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload