小编RDs*_*RDs的帖子

WebActivatorEx.ActivationManager类型出错引发异常....参数计数不匹配

安装Microsoft.Owin后,我收到此错误.*.目标.Net框架:4.5.2.Web Activator:2.2.0我在另一个项目中有相同的设置,似乎工作正常.请帮我调试或解决这个问题.

我到目前为止做了什么: -

  1. 更新了所有Nuget包
  2. 删除了obj文件夹内容
  3. 跑aspnet_compiler.exe -p C:\ source\Application\MyAPI -v something -errorstack.它确实给出了相同的错误,但在我添加WebMatrix.data后停止了.

完整错误详情: -

参数计数不匹配.描述:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息.

Stack Trace: 
[TargetParameterCountException: Parameter count mismatch.]
System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, 
BindingFlags invokeAttr, Binder binder,    Object[] parameters, CultureInfo 
culture) +11403690
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags 
invokeAttr, Binder binder, Object[]    parameters, CultureInfo culture) +54
WebActivatorEx.BaseActivationMethodAttribute.InvokeMethod() +73
WebActivatorEx.ActivationManager.RunActivationMethods(Boolean designerMode) 
+637
WebActivatorEx.ActivationManager.Run() +103

[InvalidOperationException: The pre-application start initialization method 
Run on type    WebActivatorEx.ActivationManager threw an exception with the 
following error message: Parameter count    mismatch..]
Run Code Online (Sandbox Code Playgroud)

这是package.config: -

  <package id="EntityFramework" version="6.1.3" targetFramework="net452" />
  <package …
Run Code Online (Sandbox Code Playgroud)

asp.net webactivator asp.net-web-api owin

4
推荐指数
1
解决办法
1855
查看次数

标签 统计

asp.net ×1

asp.net-web-api ×1

owin ×1

webactivator ×1