Sharp架构从1.5升级到1.9错误

发布于 2024-11-11 14:25:17 字数 2092 浏览 1 评论 0原文

我已将 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 

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

I have upgraded SharpArchitecture from 1.5 to 1.9.

I have followed the guide here http://blog.sharparchitecture.net/post/Sharp-Architecture-19-released.aspx, and ensured that I have set "copy local = true" for the various DLLs,
but I still receive the following error when running the site:

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 

Does anyone knwo what I might have forgotten?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

呢古 2024-11-18 14:25:17

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

I have been looking at the versions of SharpArchitecture in the different project several times, but apparently I had missed one project which didn't have the SharpArch DLL set to Specific Version.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文