Can't run ANTS profiler on local application
vishnu4
Posts: 4 New member
I've been able to use my application with ANTS profiler in the past, but perhaps a recent nuget package update (or profiler update) broke things. Running my application by itself i have no issues. Running under ANTS performance profiler, i get the following error:
Server Error in '/' Application.
Common Language Runtime detected an invalid program.
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.
Exception Details: System.InvalidProgramException: Common Language Runtime detected an invalid program.
Source Error:
Line 177:
Line 178: //For each Profile, include that profile in the MapperConfiguration
Line 179: var config = new MapperConfiguration(cfg =>
Line 180: {
Line 181: //cfg.AddProfile(new CustomClasses.Mapping.MappingProfile());
based on the idea here https://stackoverflow.com/questions/24834404/operation-could-destabilize-the-runtime-when-using-ants-profiler-on-a-structur i added <assemblyName>AutoMapper</assemblyName> to LineLevelBlacklist.xml. this got me past the above issue, but now i get this other newer issue:
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) Type = System.BadImageFormatException Source = Microsoft.AspNet.Identity.Owin at _ANTS_Managed_Begin_Async() at Microsoft.AspNet.Identity.Owin.SecurityStampValidator.<>c__DisplayClass1_0`3.<OnValidateIdentity>b__0(CookieValidateIdentityContext context) at Microsoft.Owin.Security.Cookies.CookieAuthenticationHandler.<AuthenticateCoreAsync>d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<BaseInitializeAsync>d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.<RunApp>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.<DoFinalWork>d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar) at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
any help figuring this out would be appreciated. The profiler is basically useless otherwise.
based on the idea here https://stackoverflow.com/questions/24834404/operation-could-destabilize-the-runtime-when-using-ants-profiler-on-a-structur i added <assemblyName>AutoMapper</assemblyName> to LineLevelBlacklist.xml. this got me past the above issue, but now i get this other newer issue:
An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) Type = System.BadImageFormatException Source = Microsoft.AspNet.Identity.Owin at _ANTS_Managed_Begin_Async() at Microsoft.AspNet.Identity.Owin.SecurityStampValidator.<>c__DisplayClass1_0`3.<OnValidateIdentity>b__0(CookieValidateIdentityContext context) at Microsoft.Owin.Security.Cookies.CookieAuthenticationHandler.<AuthenticateCoreAsync>d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<BaseInitializeAsync>d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.<RunApp>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.<DoFinalWork>d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.StageAsyncResult.End(IAsyncResult ar) at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
any help figuring this out would be appreciated. The profiler is basically useless otherwise.
Answers