“/”应用程序中的服务器错误。

试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.BadImageFormatException: 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)

源错误:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[BadImageFormatException: 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)]
   System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op) +0
   System.Data.SQLite.SQLite3.StaticIsInitialized() +130
   System.Data.SQLite.SQLiteLog.Initialize() +25
   System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework) +47
   System.Data.SQLite.SQLiteConnection..ctor() +8

[TargetInvocationException: 调用的目标发生了异常。]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +119
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
   System.Activator.CreateInstance(Type type) +11
   NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type) +6
   NHibernate.Driver.ReflectionDriveConnectionCommandProvider.CreateConnection() +28
   NHibernate.Driver.SQLite20Driver.CreateConnection() +13
   NHibernate.Connection.DriverConnectionProvider.GetConnection() +64
   NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.Prepare() +14
   NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(Dialect dialect, IConnectionHelper connectionHelper) +84
   NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactory sessionFactory) +78
   NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners) +700
   NHibernate.Cfg.Configuration.BuildSessionFactory() +104
   Castle.Facilities.NHibernateIntegration.Internal.SessionFactoryActivator.Create(CreationContext context) +132
   Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context) +126
   Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired) +93
   Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context, Boolean instanceRequired) +17
   Castle.MicroKernel.Handlers.AbstractHandler.Resolve(CreationContext context) +12
   Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments) +83
   Castle.MicroKernel.DefaultKernel.Resolve(Type service) +62
   Castle.MicroKernel.DefaultKernel.get_Item(Type service) +4
   Systen.Framework.Web.NHibernateSessionFactoryHelper.K27DyO5mTBPMS2WoQ3f(Object , Type ) +45
   Systen.Framework.Web.NHibernateSessionFactoryHelper.ConfigureLegacySessionFactory() +386
   Systen.Framework.KdContainer.qrhyXd79T42es6MFv9(Object ) +34
   Systen.Framework.KdContainer.ConfigureLegacySessionFactory() +129
   Systen.Framework.KdContainer..ctor() +243
   Systen.Framework.Bootstrapper.InitializeContainer() +121
   MvcWebsite.MvcApplication.R4XltLpIAricAXaG5lk() +26
   MvcWebsite.MvcApplication.Application_Start() +467

[HttpException (0x80004005): 调用的目标发生了异常。]
   System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +10091385
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +173
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +218
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): 调用的目标发生了异常。]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +10072580
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +95
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.3535.0