IIS7 web app error : "Could not load type 'System.Security.Claims.ClaimsIdentity' from assembly

原贴地址点击打开链接

The problem was that I even though had <compilation  targetFramework="4.0"> in the web.config, that's not enough. The web service was already compiled with 4.5 as the target (in the Visual Studio project properties) so references to ClaimsIdentiy was embedded in the dll that was produced by the build.

I tried to simply change the project property setting from 4.5 to 4.0 and recompiling but that gave be a world of other errors. I ended up creating a new VS solution and added the code back in and targetted 4.0 from the start. That let me deploy without this error (however I'm now stuck on the next error but think its unrelated to this one).

出现的原因是netFramework版本不符,创建的程序是用的4.5,使用程序的是4.0. 编者解决的办法是重新创建一个VS解决方案把代码重新拷贝进去,然后重新用4.0版本生成。

通常是用VS高版本如2012,编写的程序代码,在VS10中运行不了,看网上还有人说开发的应用程序重新用VS2012 的net framework4.0生成


相关问题可以参考以下

http://blog.csdn.net/findstr/article/details/8772372 


VS2010打开VS2012或者13的方法

http://www.cnblogs.com/johnsony/p/Version2012To2010.html

1、在sln解决方案中出现Visual Studio 2012的地方 改为2010

2、所有的工程文件.csproj中<TargetFrameWorkVersion> 版本号<TargetFrameWorkVersion> ,将版本号改为VS2010可以识别的4.0

3、删除工程文件中<import  project=“$........\Microsoft.Common.props”/>这一行

4、config文件中也有Framework更改,改为4.0即可


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值