asp.net – ActivationManager构建过程中的异常?
发布时间:2020-12-16 00:45:47 所属栏目:asp.Net 来源:网络整理
导读:在VS 2010中构建网站项目时,我收到以下异常: The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invoc
在VS 2010中构建网站项目时,我收到以下异常:
The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation.. 我该怎么去调试?当我在VS.NET和命令行(例如,通过NAnt / MSBuild)中构建时,会发生这种情况。 解决方法
要解决这个问题,您需要将-errorstack参数提供给aspnetcompiler。那么当它失败时,你不仅可以获得你现在看到的异常的堆栈跟踪,还可以获得它正在包装的InnerException。例如,当构建错误是由于未加载Cassette dll的问题引起的时,这里是输出:
error ASPRUNTIME: The pre-application start initialization method Run on type We bActivator.ActivationManager threw an exception with the following error message : Exception has been thrown by the target of an invocation.. [TypeLoadException]: Could not load type 'Cassette.Configuration.ICassetteConfig uration' from assembly 'Cassette,Version=0.8.1.0,Culture=neutral,PublicKeyTok en=null'. at Cassette.Web.StartUp..cctor() [TypeInitializationException]: The type initializer for 'Cassette.Web.StartUp' t hrew an exception. at Cassette.Web.StartUp.PreApplicationStart() [TargetInvocationException]: Exception has been thrown by the target of an invoc ation. at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method,Ob ject target,Object[] arguments,SignatureStruct& sig,MethodAttributes methodAt tributes,RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method,Obj ect target,Signature sig,MethodAttributes methodAttributes,RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,BindingFlags invoke Attr,Binder binder,Object[] parameters,CultureInfo culture,Boolean skipVisib ilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj,Object[] parameters) at WebActivator.BaseActivationMethodAttribute.InvokeMethod() at WebActivator.ActivationManager.RunActivationMethods[T]() at WebActivator.ActivationManager.RunPreStartMethods() at WebActivator.ActivationManager.Run() [InvalidOperationException]: The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following er ror message: Exception has been thrown by the target of an invocation.. at System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection` 1 methods) at System.Web.Compilation.BuildManager.CallPreStartInitMethods() at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appMan ager,IApplicationHost appHost,IConfigMapPathFactory configMapPathFactory,Host ingEnvironmentParameters hostingParameters,PolicyLevel policyLevel,Exception a ppDomainCreationException) [HttpException]: The pre-application start initialization method Run on type Web Activator.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation.. at System.Web.Compilation.ClientBuildManager.EnsureHostCreated() at System.Web.Compilation.ClientBuildManager.PrecompileApplication(ClientBuil dManagerCallback callback,Boolean forceCleanBuild) at System.Web.Compilation.Precompiler.Main(String[] args) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 如何将SQL CE 4 CTP部署到共享主机?
- asp.net-mvc – 如果是流媒体,则无法发布网站
- asp.net – 在AJAX方法调用中的RegisterClientScriptBlock
- asp.net – .NET – 如何为大CSS文件构建主题
- asp.net-mvc – 为生成的帮助标签添加冒号和星号
- asp.net-mvc – 在默认路由的ASP.NET MVC中的Url.Content的
- ASP.NET MVC中的QR代码生成
- asp.net-mvc – OnModelCreating与数据库配置的DataAnnotat
- .NET 下基于动态代理的 AOP 框架实现揭秘
- 从ASP.Net MVC访问Active Directory使用C#
推荐文章
站长推荐
- asp.net – Chrome中的样式问题与datalist
- asp.net – 如何将razor变量作为参数传递给jquer
- asp.net – 按顺序匹配的字段数量生成SQL顺序
- asp.net-mvc – 如何获得html.ActionLink结果文本
- 一个关于反序列化的小问题
- asp.net – 如何禁用Web.Config中的目录浏览
- asp.net-mvc – 保存为“BodyPart_3ded2bfb-40be
- asp.net – 如何将Sitecore Droptree源设置为项目
- forms-authentication – 在OWIN托管的SignalR实
- asp.net – 在负载均衡器上启用粘性会话
热点阅读