Skip to content

Instantly share code, notes, and snippets.

@kiliman
Created April 4, 2011 20:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kiliman/902303 to your computer and use it in GitHub Desktop.
Server Error in '/' Application.
The profiler was not initialize properly, did you forgot to call Profiler.Initialize()?
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.InvalidOperationException: The profiler was not initialize properly, did you forgot to call Profiler.Initialize()?
Source Error:
Line 9: {
Line 10: // Initialize the profiler
Line 11: EntityFrameworkProfiler.Initialize();
Line 12:
Line 13: // You can also use the profiler in an offline manner.
Source File: C:\Users\Michael\Projects\FuseInventory\FuseInventory\App_Start\EntityFrameworkProfiler.cs Line: 11
Stack Trace:
[InvalidOperationException: The profiler was not initialize properly, did you forgot to call Profiler.Initialize()?]
HibernatingRhinos.Profiler.Appender.ProfilerInfrastructure.get_MessageDispatcher() +120
HibernatingRhinos.Profiler.Appender.ProfilerIntegration.PublishProfilerEvent(String sessionId, String loggerName, String message, DateTime timestamp, Level level) +100
HibernatingRhinos.Profiler.Appender.ProfilerIntegration.PublishProfilerEvent(String sessionId, String loggerName, String message) +99
HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkAppender.ConnectionStarted(Guid connectionId) +79
HibernatingRhinos.Profiler.Appender.ProfiledDataAccess.ProfiledConnection..ctor(DbConnection inner, IDbAppender appender, DbReaderWrappingMode wrapReaders, Guid connectionId, DbProviderFactory providerFactory) +161
HibernatingRhinos.Profiler.Appender.EntityFramework.ProfiledDbProviderFactory`1.CreateConnection() +205
System.Data.Entity.Infrastructure.SqlCeConnectionFactory.CreateConnection(String nameOrConnectionString) +327
HibernatingRhinos.Profiler.Appender.EntityFramework.ProfiledConnectionFactory.Initialize() +98
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +335
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.SetupDatabaseDefaultConnectionFactoryIfNeeded() +618
HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.SetupEntityFrameworkIntegration() +83
HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.Initialize(EntityFrameworkAppenderConfiguration configuration) +41
HibernatingRhinos.Profiler.Appender.EntityFramework.EntityFrameworkProfiler.Initialize() +62
FuseInventory.App_Start.EntityFrameworkProfilerBootstrapper.PreStart() in C:\Users\Michael\Projects\FuseInventory\FuseInventory\App_Start\EntityFrameworkProfiler.cs:11
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +335
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
WebActivator.BaseActivationMethodAttribute.InvokeMethod() +241
WebActivator.ActivationManager.RunActivationMethods() +362
WebActivator.ActivationManager.RunPreStartMethods() +43
WebActivator.ActivationManager.Run() +69
[InvalidOperationException: The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +423
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +306
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677
[HttpException (0x80004005): The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +8972180
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment