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中选择相应的版本
这个方法是可行的,问题原因如题。
 

posted @ 2011-12-07 17:05  nd  阅读(1908)  评论(0编辑  收藏  举报