尝试加载格式不正确的程序。

时间:2014-04-16 21:11:01

标签: asp.net asp.net-mvc entity-framework badimageformatexception

无论出于何种原因,当我们在其中一台服务器上开始收到此异常消息时,所有这些都是Window server 2008 R2。几个星期前网站网站很好,我们不知道发生了什么变化。应用程序池已将32位应用程序设置为true。我们可以将相同的源代码部署到另一台服务器,但它可以工作,但反之亦然。

有人有什么想法吗?

描述:执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

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

BadImageFormatException:尝试加载格式不正确的程序。 (HRESULT异常:0x8007000B)]    System.Data.Entity.Internal.InterceptableDbCommand.ExecuteNonQuery()+ 0    System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.Execute(Dictionary 2 identifierValues, List 1 generatedValues)+645    System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update()+140

[UpdateException: An error occurred while updating the entries. See the inner exception for details.]
   System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() +303
   System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.<Update>b__2(UpdateTranslator ut) +9
   System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update(T noChangesResult, Func`2 updateFunction, Boolean throwOnClosedConnection) +124
   System.Data.Entity.Core.EntityClient.Internal.EntityAdapter.Update(Boolean throwOnClosedConnection) +89
   System.Data.Entity.Core.Objects.ObjectContext.<SaveChangesToStore>b__b() +18
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) +314
   System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy) +161
   System.Data.Entity.Core.Objects.<>c__DisplayClass9.<SaveChanges>b__6() +21
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +153
   System.Data.Entity.Core.Objects.ObjectContext.SaveChanges(SaveOptions options) +226
   System.Data.Entity.Internal.InternalContext.SaveChanges() +141

[DbUpdateException: An error occurred while updating the entries. See the inner exception for details.]
   System.Data.Entity.Internal.InternalContext.SaveChanges() +209
   System.Data.Entity.Internal.LazyInternalContext.SaveChanges() +27
   System.Data.Entity.DbContext.SaveChanges() +20
   SecureEDI.PMS.DataAccess.CrudEFRepository`1.Save() +35
   SecureEDI.PMS.DataAccess.CrudEFRepository`1.Create(T entity) +183
   SecureEDI.PMS.BusinessLogic.CrudEFManager`1.Create(T entity) +61
   SecureEDI.PMS.Core.Exceptions.ExceptionHandler.LogException(Exception e) +1724
   SecureEDI.PMS.Core.Exceptions.ExceptionHandler.HandleException(Exception exception) +1434
   SecureEDI.PMS.Core.Exceptions.ExceptionHandler..ctor(Exception exception) +24
   SecureEDI.PMS.Web.Controllers.BaseController.OnException(ExceptionContext filterContext) +582
   System.Web.Mvc.Controller.System.Web.Mvc.IExceptionFilter.OnException(ExceptionContext filterContext) +10
   System.Web.Mvc.ControllerActionInvoker.InvokeExceptionFilters(ControllerContext controllerContext, IList`1 filters, Exception exception) +115
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +106
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +47
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +18
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +29
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +14
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +52
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +28
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +15
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +46
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +52
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +28
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +15
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +30
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +28
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +52
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +28
   System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +15
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +820
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +148

0 个答案:

没有答案