| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 10315 人关注过本帖
标题:安全性异常 System.Security.SecurityException: 该程序集不支持部分受信 ...
取消只看楼主 加入收藏
jasoft
Rank: 1
来 自:北京 东城
等 级:新手上路
帖 子:32
专家分:0
注 册:2007-7-19
收藏
 问题点数:0 回复次数:3 
安全性异常 System.Security.SecurityException: 该程序集不支持部分受信任的调用方
我在用三层架构做网站的时候,在本地运行正常,传到服务器上出现这种错误!

该如何解决???

“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------

安全性异常
说明: 应用程序试图执行安全策略不允许的操作。要授予此应用程序所需的权限,请与系统管理员联系,或在配置文件中更改该应用程序的信任级别。

异常详细信息: System.Security.SecurityException: 该程序集不支持部分受信任的调用方。

源错误:


行 54:                   </asp:Repeater>
行 55:                 
行 56:                   <div id="index_zj_zj_xm_xm" align=center><div id="index_zj_zj_xm_xm1"> <webdiyer:AspNetPager ID="Anp_Repeater" CssClass="dd" runat="server" PageSize="5" ShowNavigationToolTip="True" OnPageChanged="Anp_Repeater_PageChanged" CustomInfoHTML="页面  <font color='red'><b>%CurrentPageIndex%</b></font> of  %PageCount%  显示: %StartRecordIndex%-%EndRecordIndex% 总条数: %RecordCount%" ShowCustomInfoSection="Left" AlwaysShow="True" FirstPageText="首页" LastPageText="末页" NextPageText="下一页" PrevPageText="上一页" ShowBoxThreshold="10">
行 57:     </webdiyer:AspNetPager></div></div>
行 58:                 </div>
 

源文件: e:\website\\Web\Default.aspx    行: 56

堆栈跟踪:


[SecurityException: 该程序集不支持部分受信任的调用方。]
   ASP.default_aspx.__BuildControlAnp_Repeater() in e:\website\\Web\Default.aspx:56
   ASP.default_aspx.__BuildControl__control5(Control __ctrl) in e:\website\\Web\Default.aspx:16
   System.Web.(Control container) +12
   System.Web.UI.UpdatePanel.CreateContents(Boolean recreate) +142
   System.Web.UI.UpdatePanel.OnInit(EventArgs e) +34
   System.Web.UI.Control.InitRecursive(Control namingContainer) +321
   System.Web.UI.Control.InitRecursive(Control namingContainer) +198
   System.Web.UI.Control.InitRecursive(Control namingContainer) +198
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
   System.Web.UI.Page.ProcessRequest() +86
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.default_aspx.ProcessRequest(HttpContext context) in App_Web_4kyssgzd.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

 


--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.1433; 版本:2.0.50727.1433
搜索更多相关主题的帖子: Security System 
2008-10-24 16:33
jasoft
Rank: 1
来 自:北京 东城
等 级:新手上路
帖 子:32
专家分:0
注 册:2007-7-19
收藏
得分:0 
这个错误和程序本身的代码没有关系吧?
2008-10-25 09:57
jasoft
Rank: 1
来 自:北京 东城
等 级:新手上路
帖 子:32
专家分:0
注 册:2007-7-19
收藏
得分:0 
还有一个问题,也是在网上出现的

这个是不是也和服务器的安全设置有关系啊,用到ajax的界面就出现这个问题,没有用的界面可以运行

安全性异常
说明: 应用程序试图执行安全策略不允许的操作。要授予此应用程序所需的权限,请与系统管理员联系,或在配置文件中更改该应用程序的信任级别。

异常详细信息: System.Security.SecurityException: 请求“System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”类型的权限已失败。

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。
2008-10-25 10:00
jasoft
Rank: 1
来 自:北京 东城
等 级:新手上路
帖 子:32
专家分:0
注 册:2007-7-19
收藏
得分:0 
谢了,我今天传到我们公司一个空间里去测试就可以用了,在我自己申请的一个免费空间里不可以用,
2008-10-25 10:26
快速回复:安全性异常 System.Security.SecurityException: 该程序集不支持部分 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012721 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved