I have a web api running on 2 servers (server01 and server02) with a load balancer. The api is pointing to the same database server.
This run ok on server01 but getting this error on server02.
2018-02-08 17:41:03.1925 – ERROR: Profile Tracking Service API - Exception Error while executing ProfileTrackingController - CreateProfile() for user Email - (xxxx@outlook.com), CareId -(xxxxxxxxxx), Error Message - Method not found: 'System.Data.Entity.Migrations.Builders.TableBuilder1<!0> System.Data.Entity.Migrations.Builders.TableBuilder1.Index(System.Linq.Expressions.Expression1<System.Func2>, Boolean, Boolean, System.Object)'.
2018-02-08 17:41:03.1925 – ERROR: Unhandled error has occurred - Method not found: 'System.Data.Entity.Migrations.Builders.TableBuilder1<!0> System.Data.Entity.Migrations.Builders.TableBuilder1.Index(System.Linq.Expressions.Expression1<System.Func2>, Boolean, Boolean, System.Object)'. @ 2/8/2018 5:41:03 PM 2018-02-08 17:41:03.1925 – ERROR: stack trace - at Data.Personalisation.Reporting.Migrations.Initials.Up() at System.Data.Entity.Migrations.DbMigrator.ApplyMigration(DbMigration migration, DbMigration lastMigration) at System.Data.Entity.Migrations.DbMigrator.Upgrade(IEnumerable1 pendingMigrations, String targetMigrationId, String lastMigrationId) at System.Data.Entity.Migrations.DbMigrator.UpdateInternal(String targetMigration) at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase) at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration) at System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func3 createMigrator, ObjectContext objectContext) at System.Data.Entity.Database.Create(DatabaseExistenceState existenceState) at System.Data.Entity.CreateDatabaseIfNotExists1.InitializeDatabase(TContext context) at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() at System.Data.Entity.Internal.RetryAction1.PerformAction(TInput input) at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action1 action) at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) at System.Data.Entity.Internal.Linq.InternalSet1.Initialize() at System.Data.Entity.Internal.Linq.InternalSet1.get_InternalContext() at System.Data.Entity.Infrastructure.DbQuery1.System.Linq.IQueryable.get_Provider() at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable1 source, Expression1 predicate)
at Personalisation.Web.Service.Reporting.Services.ProfileTrackingService.GetUserProfileTrackingIdByEmailAndCareId(String email, String careId) in Personalisation.Web.Service.Reporting\Services\ProfileTrackingService.cs:line 195 at Personalisation.Web.Service.Reporting.Services.ProfileTrackingService.CreateUserProfileTracking(String email, String careId, String aspNetId, String autoEmailConfirmation, String auto) in Personalisation.Web.Service.Reporting\Services\ProfileTrackingService.cs:line 57 at Personalisation.Web.Service.Reporting.Controllers.ProfileTrackingController.CreateProfile(String email, String careId, String aspNetId, String autoEmailConfirmation, String autoRegister) in Personalisation.Web.Service.Reporting\Controllers\ProfileTrackingController.cs:line 48 @ 2/8/2018 5:41:03 PM
I know this is definitely EF issue but I have no clue why this is happening on server02.
Aucun commentaire:
Enregistrer un commentaire