【问题标题】:ComponentActivator: could not instantiate Repository","ExceptionType":" Castle.MicroKernel.ComponentActivator.ComponentActivatorExceptionComponentActivator: 无法实例化 Repository","ExceptionType":" Castle.MicroKernel.ComponentActivator.ComponentActivatorException
【发布时间】:2014-07-26 03:51:48
【问题描述】:

我在 MVC5 应用程序中使用温莎城堡。将 Web 服务部署到 IIS 后,出现以下错误

{"$id":"1","Message":"发生错误。","ExceptionMessage":"ComponentActivator: 无法实例化 XXXRepository","ExceptionType":" Castle.MicroKernel.ComponentActivator.ComponentActivatorException "

如果我使用 VS 内置服务器运行上述程序,它工作正常。

任何建议/指针将不胜感激。

【问题讨论】:

  • 内部异常会告诉你根本问题是什么。

标签: entity-framework asp.net-mvc-5 castle-windsor


【解决方案1】:

上述问题通过添加EntityFramework.SQLServer.dll文件解决

【讨论】:

  • 我已将此 dll 添加到项目中,并且可以在服务器 (Azure) 上看到它,但仍然出现错误。应用程序在本地运行良好。应用程序在开始执行 SomeContext:base("SomeContext") 时抛出异常。内部异常与 OP 标题中的一样。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2022-01-03
  • 2022-01-15
  • 2016-06-09
  • 2020-10-26
  • 2016-11-22
  • 2016-02-29
  • 2017-01-29
相关资源
最近更新 更多