howtodrivesafe
asked on
Common Language Runtime detected an invalid program. at
In IIS only affects certain customers. I can restart IIS issue goes away then randomly I get error emails again. I think something do with identity service but it's a little Greek to me.
Project County
PageURL "removed"
ErrorMessage: System.InvalidProgramExcep tion: Common Language Runtime detected an invalid program. at System.Data.ProviderBase.D bConnectio nPool.TryG etConnecti on(DbConne ction owningObject, UInt32 waitForMultipleObjectsTime out, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.D bConnectio nPool.TryG etConnecti on(DbConne ction owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.D bConnectio nFactory.T ryGetConne ction(DbCo nnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.D bConnectio nInternal. TryOpenCon nectionInt ernal(DbCo nnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.D bConnectio nClosed.Tr yOpenConne ction(DbCo nnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlC onnection. TryOpenInn er(TaskCom pletionSou rce`1 retry) at System.Data.SqlClient.SqlC onnection. TryOpen(Ta skCompleti onSource`1 retry) at System.Data.SqlClient.SqlC onnection. Open() at System.Data.Entity.Infrast ructure.In terception .DbConnect ionDispatc her.b__36( DbConnecti on t, DbConnectionInterceptionCo ntext c) at System.Data.Entity.Infrast ructure.In terception .InternalD ispatcher` 1.Dispatch [TTarget,T Intercepti onContext] (TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) at System.Data.Entity.Infrast ructure.In terception .DbConnect ionDispatc her.Open(D bConnectio n connection, DbInterceptionContext interceptionContext) at System.Data.Entity.SqlServ er.SqlProv iderServic es.<>c__Di splayClass 33.b__32() at System.Data.Entity.SqlServ er.Default SqlExecuti onStrategy .<>c__Disp layClass1. b__0() at System.Data.Entity.SqlServ er.Default SqlExecuti onStrategy .Execute[T Result](Fu nc`1 operation) at System.Data.Entity.SqlServ er.Default SqlExecuti onStrategy .Execute(A ction operation) at System.Data.Entity.SqlServ er.SqlProv iderServic es.UsingCo nnection(D bConnectio n sqlConnection, Action`1 act) at System.Data.Entity.SqlServ er.SqlProv iderServic es.UsingMa sterConnec tion(DbCon nection sqlConnection, Action`1 act) at System.Data.Entity.SqlServ er.SqlProv iderServic es.CreateD atabaseFro mScript(Nu llable`1 commandTimeout, DbConnection sqlConnection, String createDatabaseScript) at System.Data.Entity.SqlServ er.SqlProv iderServic es.DbCreat eDatabase( DbConnecti on connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) at System.Data.Entity.Core.Co mmon.DbPro viderServi ces.Create Database(D bConnectio n connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) at System.Data.Entity.Core.Ob jects.Obje ctContext. CreateData base() at System.Data.Entity.Migrati ons.Utilit ies.Databa seCreator. Create(DbC onnection connection) at System.Data.Entity.Migrati ons.DbMigr ator.Ensur eDatabaseE xists(Acti on mustSucceedToKeepDatabase) at System.Data.Entity.Migrati ons.Infras tructure.M igratorBas e.EnsureDa tabaseExis ts(Action mustSucceedToKeepDatabase) at System.Data.Entity.Migrati ons.DbMigr ator.Updat e(String targetMigration) at System.Data.Entity.Migrati ons.Infras tructure.M igratorBas e.Update() at System.Data.Entity.Interna l.Database Creator.Cr eateDataba se(Interna lContext internalContext, Func`3 createMigrator, ObjectContext objectContext) at System.Data.Entity.Interna l.Internal Context.Cr eateDataba se(ObjectC ontext objectContext, DatabaseExistenceState existenceState) at System.Data.Entity.Databas e.Create(D atabaseExi stenceStat e existenceState) at System.Data.Entity.CreateD atabaseIfN otExists`1 .Initializ eDatabase( TContext context) at System.Data.Entity.Interna l.Internal Context.<> c__Display Classf`1.b __e() at System.Data.Entity.Interna l.Internal Context.Pe rformIniti alizationA ction(Acti on action) at System.Data.Entity.Interna l.Internal Context.Pe rformDatab aseInitial ization() at System.Data.Entity.Interna l.LazyInte rnalContex t.b__4(Int ernalConte xt c) at System.Data.Entity.Interna l.RetryAct ion`1.Perf ormAction( TInput input) at System.Data.Entity.Interna l.LazyInte rnalContex t.Initiali zeDatabase Action(Act ion`1 action) at System.Data.Entity.Interna l.LazyInte rnalContex t.Initiali zeDatabase () at System.Data.Entity.Interna l.Internal Context.In itialize() at System.Data.Entity.Interna l.Internal Context.Ge tEntitySet AndBaseTyp eForType(T ype entityType) at System.Data.Entity.Interna l.Linq.Int ernalSet`1 .Initializ e() at System.Data.Entity.Interna l.Linq.Int ernalSet`1 .get_Inter nalContext () at System.Data.Entity.Infrast ructure.Db Query`1.Sy stem.Linq. IQueryable .get_Provi der() at System.Data.Entity.Queryab leExtensio ns.FirstOr DefaultAsy nc[TSource ](IQueryab le`1 source, Expression`1 predicate, CancellationToken cancellationToken) at System.Data.Entity.Queryab leExtensio ns.FirstOr DefaultAsy nc[TSource ](IQueryab le`1 source, Expression`1 predicate) at Microsoft.AspNet.Identity. EntityFram ework.User Store`6.d_ _6c.MoveNe xt() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionSe rvices.Exc eptionDisp atchInfo.T hrow() at System.Runtime.CompilerSer vices.Task Awaiter.Th rowForNonS uccess(Tas k task) at System.Runtime.CompilerSer vices.Task Awaiter.Ha ndleNonSuc cessAndDeb uggerNotif ication(Ta sk task) at System.Runtime.CompilerSer vices.Task Awaiter.Va lidateEnd( Task task) at System.Runtime.CompilerSer vices.Task Awaiter`1. GetResult( ) at Microsoft.AspNet.Identity. TaskExtens ions.Cultu reAwaiter` 1.GetResul t() at Microsoft.AspNet.Identity. Owin.SignI nManager`2 .d__29.Mov eNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionSe rvices.Exc eptionDisp atchInfo.T hrow() at System.Runtime.CompilerSer vices.Task Awaiter.Th rowForNonS uccess(Tas k task) at System.Runtime.CompilerSer vices.Task Awaiter.Ha ndleNonSuc cessAndDeb uggerNotif ication(Ta sk task) at System.Runtime.CompilerSer vices.Task Awaiter.Va lidateEnd( Task task) at System.Runtime.CompilerSer vices.Task Awaiter`1. GetResult( ) at Microsoft.AspNet.Identity. AsyncHelpe r.RunSync[ TResult](F unc`1 func) at Microsoft.AspNet.Identity. Owin.SignI nManagerEx tensions.P asswordSig nIn[TUser, TKey](Sign InManager` 2 manager, String userName, String password, Boolean isPersistent, Boolean shouldLockout) at County.Controllers.Account Controller .Login(Log inViewMode l model, String returnUrl) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMetho dDispatche r.Execute( Controller Base controller, Object[] parameters) at System.Web.Mvc.ReflectedAc tionDescri ptor.Execu te(Control lerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerA ctionInvok er.InvokeA ctionMetho d(Controll erContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.Async Controller ActionInvo ker.Action Invocation .InvokeSyn chronousAc tionMethod () at System.Web.Mvc.Async.Async Controller ActionInvo ker.b__39( IAsyncResu lt asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncResu lt`2.CallE ndDelegate (IAsyncRes ult asyncResult) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncResu ltBase`1.E nd() at System.Web.Mvc.Async.Async ResultWrap per.End[TR esult](IAs yncResult asyncResult, Object tag) at System.Web.Mvc.Async.Async Controller ActionInvo ker.EndInv okeActionM ethod(IAsy ncResult asyncResult) at System.Web.Mvc.Async.Async Controller ActionInvo ker.AsyncI nvocationW ithFilters .b__3d() at System.Web.Mvc.Async.Async Controller ActionInvo ker.AsyncI nvocationW ithFilters .<>c__Disp layClass46 .b__3f() at System.Web.Mvc.Async.Async Controller ActionInvo ker.<>c__D isplayClas s33.b__32( IAsyncResu lt asyncResult) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncResu lt`1.CallE ndDelegate (IAsyncRes ult asyncResult) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncResu ltBase`1.E nd() at System.Web.Mvc.Async.Async ResultWrap per.End[TR esult](IAs yncResult asyncResult, Object tag) at System.Web.Mvc.Async.Async Controller ActionInvo ker.EndInv okeActionM ethodWithF ilters(IAs yncResult asyncResult) at System.Web.Mvc.Async.Async Controller ActionInvo ker.<>c__D isplayClas s21.<>c__D isplayClas s2b.b__1c( ) at System.Web.Mvc.Async.Async Controller ActionInvo ker.<>c__D isplayClas s21.b__1e( IAsyncResu lt asyncResult) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncResu lt`1.CallE ndDelegate (IAsyncRes ult asyncResult) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncResu ltBase`1.E nd() at System.Web.Mvc.Async.Async ResultWrap per.End[TR esult](IAs yncResult asyncResult, Object tag) at System.Web.Mvc.Async.Async Controller ActionInvo ker.EndInv okeAction( IAsyncResu lt asyncResult) at System.Web.Mvc.Controller. b__1d(IAsy ncResult asyncResult, ExecuteCoreState innerState) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncVoid `1.CallEnd Delegate(I AsyncResul t asyncResult) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncResu ltBase`1.E nd() at System.Web.Mvc.Async.Async ResultWrap per.End[TR esult](IAs yncResult asyncResult, Object tag) at System.Web.Mvc.Async.Async ResultWrap per.End(IA syncResult asyncResult, Object tag) at System.Web.Mvc.Controller. EndExecute Core(IAsyn cResult asyncResult) at System.Web.Mvc.Controller. b__15(IAsy ncResult asyncResult, Controller controller) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncVoid `1.CallEnd Delegate(I AsyncResul t asyncResult) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncResu ltBase`1.E nd() at System.Web.Mvc.Async.Async ResultWrap per.End[TR esult](IAs yncResult asyncResult, Object tag) at System.Web.Mvc.Async.Async ResultWrap per.End(IA syncResult asyncResult, Object tag) at System.Web.Mvc.Controller. EndExecute (IAsyncRes ult asyncResult) at System.Web.Mvc.Controller. System.Web .Mvc.Async .IAsyncCon troller.En dExecute(I AsyncResul t asyncResult) at System.Web.Mvc.MvcHandler. b__5(IAsyn cResult asyncResult, ProcessRequestState innerState) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncVoid `1.CallEnd Delegate(I AsyncResul t asyncResult) at System.Web.Mvc.Async.Async ResultWrap per.Wrappe dAsyncResu ltBase`1.E nd() at System.Web.Mvc.Async.Async ResultWrap per.End[TR esult](IAs yncResult asyncResult, Object tag) at System.Web.Mvc.Async.Async ResultWrap per.End(IA syncResult asyncResult, Object tag) at System.Web.Mvc.MvcHandler. EndProcess Request(IA syncResult asyncResult) at System.Web.Mvc.MvcHandler. System.Web .IHttpAsyn cHandler.E ndProcessR equest(IAs yncResult result) at System.Web.HttpApplication .CallHandl erExecutio nStep.Syst em.Web.Htt pApplicati on.IExecut ionStep.Ex ecute() at System.Web.HttpApplication .ExecuteSt ep(IExecut ionStep step, Boolean& completedSynchronously)
Project County
PageURL "removed"
ErrorMessage: System.InvalidProgramExcep
ASKER
Thanks, strangely ended up being active directory server's DNS All I know is I reinstalled copied from Antone replicated service it started working fine again.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
I've seen a quite similar issue a while back where there appeared to be lots of files in c:\windows\temp. If so then try to move the contents to a different folder.
Cheers