title: Invalid column name 'Discriminator'
body: <p>I have an existing <code>ASP NET MVC 5</code> that has uses <code>AppUsers</code> database to authenticate users.   It been working for over a year.</p>
  
  <p>Today, I created a new demo ASP MVC 5 application and set the <code>[Authorize]</code> tag to a specific <code>[AspNetRoles]</code> role.   I also have the "AppUsers" <code>connectionString</code> set up in the new application <code>web.config</code> file.   It is identical connection as the first existing application</p>
  
  <p>When I try to login using the new application, I get the error shown below.   I assumed that I can use the "AppUsers" DB to authenticate users using different applications.   Any suggestion on how to resolve this would be greatly appreciated.   I searched the web, but this error seems to have many different causes, none I have seen seems to explain my issue.</p>
  
  <p>Thank you 
  Mike</p>
  
  <blockquote>
    <p>Invalid column name 'Discriminator'.
        Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more
    information about the error and where it originated in the code.</p>
  
  <pre><code>Exception Details: System.Data.SqlClient.SqlException: Invalid column name 'Discriminator'.
  
  Source Error:
  
  
  Line 46:             if (ModelState.IsValid)
  Line 47:             {
  Line 48:                 var user = await UserManager.FindAsync(model.UserName, model.Password);
  Line 49:                 if (user != null)
  Line 50:                 {
  
  
  Source File: c:\Users\204026705\Documents\MyApps\!!!!VSnet\TestPublishToNewServer\TestPublishToNewServer\Controllers\AccountController.cs
  </code></pre>
    
    <p>Line: 48</p>
  
  <pre><code>Stack Trace:
  
  
  [SqlException (0x80131904): Invalid column name 'Discriminator'.]
     System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
  </code></pre>
    
    <p>+1767866
           System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
    exception, Boolean breakConnection, Action<code>1 wrapCloseInAction)
    +5352418
           System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
    stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +244
           System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream,
    BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
    stateObj, Boolean&amp; dataReady) +1691
           System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +61
           System.Data.SqlClient.SqlDataReader.get_MetaData() +90
           System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
    RunBehavior runBehavior, String resetOptionsString) +365
           System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
    async, Int32 timeout, Task&amp; task, Boolean asyncWrite, SqlDataReader
    ds) +1406
           System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
    method, TaskCompletionSource</code>1 completion, Int32 timeout, Task&amp; task,
    Boolean asyncWrite) +177
           System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
    method) +53
           System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +134
           System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior
    behavior) +41
           System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +10
           System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.b__c(DbCommand
    t, DbCommandInterceptionContext<code>1 c) +66
           System.Data.Entity.Infrastructure.Interception.InternalDispatcher</code>1.Dispatch(TTarget
    target, Func<code>3 operation, TInterceptionContext interceptionContext,
    Action</code>3 executing, Action`3 executed) +138
           System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand
    command, DbCommandInterceptionContext interceptionContext) +475
           System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader(CommandBehavior
    behavior) +239
           System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +10
           System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand
    entityCommand, CommandBehavior behavior) +97</p>
  
  <pre><code>[EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for
  </code></pre>
    
    <p>details.]
           System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand
    entityCommand, CommandBehavior behavior) +181
           System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute(ObjectContext
    context, ObjectParameterCollection parameterValues) +1282
           System.Data.Entity.Core.Objects.&lt;>c__DisplayClass7.b__6()
    +184
           System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func<code>1
    func, IDbExecutionStrategy executionStrategy, Boolean
    startLocalTransaction, Boolean releaseConnectionOnSuccess) +448
           System.Data.Entity.Core.Objects.&lt;&gt;c__DisplayClass7.&lt;GetResults&gt;b__5()
    +270
           System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func</code>1
    operation) +251
           System.Data.Entity.Core.Objects.ObjectQuery<code>1.GetResults(Nullable</code>1
    forMergeOption) +645
           System.Data.Entity.Core.Objects.ObjectQuery<code>1.&lt;System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator&gt;b__0()
    +68
           System.Data.Entity.Internal.LazyEnumerator</code>1.MoveNext() +68
           System.Linq.Enumerable.FirstOrDefault(IEnumerable<code>1 source) +164
           System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.&lt;GetElementFunction&gt;b__1(IEnumerable</code>1
    sequence) +83
           System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle(IEnumerable<code>1
    query, Expression queryRoot) +107
           System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute(Expression
    expression) +197
           System.Data.Entity.Internal.Linq.DbQueryProvider.Execute(Expression
    expression) +155
           System.Linq.Queryable.FirstOrDefault(IQueryable</code>1 source) +251
           Microsoft.AspNet.Identity.EntityFramework.UserStore<code>1.FindByNameAsync(String
    userName) +1175
           Microsoft.AspNet.Identity.&lt;FindByNameAsync&gt;d__d.MoveNext() +231
           System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task) +93
           System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task) +52
           System.Runtime.CompilerServices.TaskAwaiter</code>1.GetResult() +24
           Microsoft.AspNet.Identity.d__15.MoveNext() +540
           System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task) +93
           System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task) +52
           System.Runtime.CompilerServices.TaskAwaiter<code>1.GetResult() +24
           TestPublishToNewServer.Controllers.&lt;Login&gt;d__2.MoveNext() in c:\Users\204026705\Documents\MyApps\!!!!VSnet\TestPublishToNewServer\TestPublishToNewServer\Controllers\AccountController.cs:48
           System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
    task) +93
           System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
    task) +52
           System.Runtime.CompilerServices.TaskAwaiter.GetResult() +21
           lambda_method(Closure , Task ) +64
           System.Threading.Tasks.TaskHelpersExtensions.ThrowIfFaulted(Task task)
    +64
           System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult
    asyncResult) +114
           System.Web.Mvc.Async.&lt;&gt;c__DisplayClass34.&lt;BeginInvokeAsynchronousActionMethod&gt;b__33(IAsyncResult
    asyncResult) +65
           System.Web.Mvc.Async.WrappedAsyncResult</code>1.CallEndDelegate(IAsyncResult
    asyncResult) +47
           System.Web.Mvc.Async.WrappedAsyncResultBase<code>1.End() +136
           System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +102
           System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult
    asyncResult) +49
           System.Web.Mvc.Async.AsyncInvocationWithFilters.&lt;InvokeActionMethodFilterAsynchronouslyRecursive&gt;b__3c()
    +117
           System.Web.Mvc.Async.&lt;&gt;c__DisplayClass45.&lt;InvokeActionMethodFilterAsynchronouslyRecursive&gt;b__3e()
    +323
           System.Web.Mvc.Async.&lt;&gt;c__DisplayClass30.&lt;BeginInvokeActionMethodWithFilters&gt;b__2f(IAsyncResult asyncResult) +44
           System.Web.Mvc.Async.WrappedAsyncResult</code>1.CallEndDelegate(IAsyncResult
    asyncResult) +47
           System.Web.Mvc.Async.WrappedAsyncResultBase<code>1.End() +136
           System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +102
           System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult
    asyncResult) +50
           System.Web.Mvc.Async.&lt;&gt;c__DisplayClass28.&lt;BeginInvokeAction&gt;b__19()
    +72
           System.Web.Mvc.Async.&lt;&gt;c__DisplayClass1e.&lt;BeginInvokeAction&gt;b__1b(IAsyncResult
    asyncResult) +185
           System.Web.Mvc.Async.WrappedAsyncResult</code>1.CallEndDelegate(IAsyncResult
    asyncResult) +42
           System.Web.Mvc.Async.WrappedAsyncResultBase<code>1.End() +133
           System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +56
           System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult
    asyncResult) +40
           System.Web.Mvc.Controller.&lt;BeginExecuteCore&gt;b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +34
           System.Web.Mvc.Async.WrappedAsyncVoid</code>1.CallEndDelegate(IAsyncResult
    asyncResult) +70
           System.Web.Mvc.Async.WrappedAsyncResultBase<code>1.End() +139
           System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
           System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
           System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +44
           System.Web.Mvc.Controller.&lt;BeginExecute&gt;b__15(IAsyncResult asyncResult, Controller controller) +39
           System.Web.Mvc.Async.WrappedAsyncVoid</code>1.CallEndDelegate(IAsyncResult
    asyncResult) +62
           System.Web.Mvc.Async.WrappedAsyncResultBase<code>1.End() +139
           System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
           System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
           System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +39
           System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult
    asyncResult) +39
           System.Web.Mvc.MvcHandler.&lt;BeginProcessRequest&gt;b__4(IAsyncResult
    asyncResult, ProcessRequestState innerState) +39
           System.Web.Mvc.Async.WrappedAsyncVoid</code>1.CallEndDelegate(IAsyncResult
    asyncResult) +70
           System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +139
           System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +59
           System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40
           System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +40
           System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult
    result) +38
           System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    +9514928
           System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +155</p>
  </blockquote>