天天看点

Framework版本导致不能加载相应的组件

报错:

Server Error in '/CorpOfflineHotel' Application.

--------------------------------------------------------------------------------

Could not load file or assembly 'System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The module was expected to contain an assembly manifest.

解决1:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\caspol.exe -m -ag 1 -url "

file:////\\computername\sharename\

*" FullTrust -exclusive on

The operation you are performing will alter security policy?

Are you sure you want to perform this operation?

y

Added union code group with "-url" membership condition to the Machine level.

Success.

这个方法是从网上找到的,不行

解决2:

项目用的是Framework 2.0.50727,所以不会涉及到“Version=3.0.0.0”,我删除了Framework 3.0,然后就可以了。

后来同事提示在IIS里面有个地方设置网站属性的地方,在这个地方修改成相应的版本就可以了。具体如下:

开始->运行->输入inetmgr->右击“网站”->选择“属性”->选择“ASP.NET”->在ASP.NET Version中选择相应的版本

这个方法是可行的,问题原因如题。

作者:

Tyler Ning

出处:

http://www.cnblogs.com/tylerdonet/

本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,如有问题,可以通过以下邮箱地址

[email protected]

 联系我,非常感谢。

继续阅读