我们正在使用 ASP.Net MVC 3.0 框架开发应用程序。我们使用结构映射在运行时注入对象。为此,我们使用构造函数注入。我们编写了自定义控制器工厂,其中控制器的创建通过return (Controller)ObjectFactory.GetInstance(controllerType);
. 通过将接口与具体类映射来使用 DSL 定义定义。
当应用程序在 Visual Studio 开发服务器上运行时,一切正常。但是,当在 IIS 7.0 上部署相同的应用程序时,它会在运行时创建对象时引发 207 错误。
任何人都可以帮助我们是否需要更新 IIS 上的任何设置或帮助调试此问题的步骤?请在以下堆栈跟踪中找到该问题
ExceptionStructureMap Exception Code:
207 Internal exception while creating Instance '83248ea8-b195-4166-8a7d-678e9a677c9f' of PluginType Payrs.Web.Controllers.PaymentRequestController.
Check the inner exception for more details.Stack Trace :
at StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder)
at StructureMap.Pipeline.ConstructorInstance.build(Type pluginType, BuildSession session)
at StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session)
at StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session)
at StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session)
at StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance)
at StructureMap.BuildSession.<>c__DisplayClass3.<.ctor>b__1()
at StructureMap.BuildSession.CreateInstance(Type pluginType)
at Payrs.Web.Infrastructure.PayrsControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType)
**Inner Exception**
at Payrs.Web.Controllers.PaymentRequestController..ctor(IPaymentService paymentRequestService, IFundingService fundingService)
at lambda_method(Closure , IArguments )
at StructureMap.Construction.BuilderCompiler.FuncCompiler`1.<>c__DisplayClass2.<CreateBuilder>b__0(IArguments args)
at StructureMap.Construction.InstanceBuilder.BuildInstance(IArguments args)
at StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder)