【问题标题】:Sharparchitecture upgrade from 1.5 to 1.9 errorSharparchitecture 从 1.5 升级到 1.9 错误
【发布时间】:2011-06-03 11:08:51
【问题描述】:

我已将 SharpArchitecture 从 1.5 升级到 1.9。

我已按照http://blog.sharparchitecture.net/post/Sharp-Architecture-19-released.aspx 此处的指南进行操作,并确保我为各种 DLL 设置了“copy local = true”, 但我在运行网站时仍然收到以下错误:

Exception Details: System.ArrayTypeMismatchException: Attempted to
access an element as a type incompatible with the array.

Source Error:

Line 35:             log4net.Config.XmlConfigurator.Configure();
Line 36:             ViewEngines.Engines.Clear();
Line 37:             ViewEngines.Engines.Add(new AreaViewEngine());
Line 38:
Line 39:             ModelBinders.Binders.DefaultBinder = new
SharpModelBinder();

Source File: xxx.Web
\Global.asax.cs    Line: 37

Stack Trace:

[ArrayTypeMismatchException: Attempted to access an element as a type
incompatible with the array.]
   System.Collections.Generic.List`1.Insert(Int32 index, T item) +62
   xxx.Web.MvcApplication.Application_Start() in

[HttpException (0x80004005): Attempted to access an element as a type
incompatible with the array.]

System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext
context, HttpApplication app) +3988565
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr
appContext, HttpContext context, MethodInfo[] handlers) +191
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) +325

System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) +407
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr
appContext) +375

[HttpException (0x80004005): Attempted to access an element as a type
incompatible with the array.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
+11529072
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
+141

System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
wr, HttpContext context) +4784373 

有人知道我可能忘记了什么吗?

【问题讨论】:

    标签: sharp-architecture


    【解决方案1】:

    我已经多次查看不同项目中的 SharpArchitecture 版本,但显然我错过了一个没有将 SharpArch DLL 设置为特定版本的项目。

    【讨论】:

      猜你喜欢
      • 2014-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-25
      • 2012-12-12
      • 1970-01-01
      相关资源
      最近更新 更多