急救,ASP.NET C#网站在我本机都生成且发布是OK的,但上传至网站服务器后却提示出错了!请指教,十二万分谢谢!
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers.
Source Error:
Line 59: </ItemTemplate>
Line 60: </asp:DataList>
Line 61: <webdiyer:aspnetpager ID="AspNetPager1" runat="server" CssClass="formfield"
Line 62: CustomInfoClass="formbutton"
Line 63: CustomInfoHTML="第<font color='red'><b>%CurrentPageIndex%</b></font>页 共%PageCount% 页 %StartRecordIndex%-%EndRecordIndex%"
Source File: d:\hosting\6589275\html\msk222\Productlist.aspx Line: 61
Stack Trace:
[SecurityException: That assembly does not allow partially trusted callers.]
ASP.productlist_aspx.__BuildControlAspNetPager1() in d:\hosting\6589275\html\msk222\Productlist.aspx:61
ASP.productlist_aspx.__BuildControlform1() in d:\hosting\6589275\html\msk222\Productlist.aspx:12
ASP.productlist_aspx.__BuildControlContent1(Control __ctrl) in d:\hosting\6589275\html\msk222\Productlist.aspx:3
System.Web.UI.CompiledTemplateBuilder.InstantiateIn(Control container) +12
ASP.masterpage_master.__BuildControlhead() in d:\hosting\6589275\html\msk222\MasterPage.master:29
ASP.masterpage_master.__BuildControlTree(masterpage_master __ctrl) in d:\hosting\6589275\html\msk222\MasterPage.master:1
ASP.masterpage_master.FrameworkInitialize() in App_Web_masterpage.master.cdcab7d2.yxxvkspn.0.cs:0
System.Web.UI.UserControl.InitializeAsUserControlInternal() +35
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +8682223
System.Web.UI.Page.get_Master() +51
System.Web.UI.Page.ApplyMasterPage() +15
System.Web.UI.Page.PerformPreInit() +45
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
System.Web.UI.Page.ProcessRequest() +80
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.productlist_aspx.ProcessRequest(HttpContext context) in App_Web_productlist.aspx.cdcab7d2.ld2hza7e.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
--------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4216; ASP.NET Version:2.0.50727.4223
我在product.aspx 页面中是采用了分页控件。
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
我在单机上都运行没问题的! 而且我编译后上传上去的Bin目录中是存在 AspNetPager.dll 这个文件的。
但为啥上传至服务器上后却运行pooduct.aspx 页面则出现上面的错误呢?
要如何解决,望高手指教,谢谢!
------解决方案--------------------看错误信息的话 好像是安全策略的问题吧!
------解决方案--------------------