Server Error in '/' Application.

Attempt by security transparent method 'ASP.news_default_aspx.__BuildControl__control14()' to access LinkDemand protected method 'KaspidPager.WebControls.UrlRewriteNextPreviousPagerField..ctor()' failed.  Methods must be security critical or security safe-critical to satisfy a LinkDemand.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MethodAccessException: Attempt by security transparent method 'ASP.news_default_aspx.__BuildControl__control14()' to access LinkDemand protected method 'KaspidPager.WebControls.UrlRewriteNextPreviousPagerField..ctor()' failed.  Methods must be security critical or security safe-critical to satisfy a LinkDemand.

Source Error:


Line 75:         <asp:DataPager ID="dpNews" runat="server" PagedControlID="lvwNews" PageSize="10" QueryStringField="page">
Line 76:             <Fields>
Line 77:                 <KaspidPager:UrlRewriteNextPreviousPagerField ButtonType="Link" ShowFirstPageButton="false" ShowNextPageButton="False" PreviousPageText="قبلی" FirstPageText="" ShowPreviousPageButton="true"
Line 78:                     ButtonCssClass="pback" />
Line 79:                 <KaspidPager:UrlRewriteNumericPagerField NumericButtonCssClass="" CurrentPageLabelCssClass="pcur" />

Source File: e:\vhosts\cfp-co.com\httpdocs\cfp-co.com\news\Default.aspx    Line: 77

Stack Trace:


[MethodAccessException: Attempt by security transparent method 'ASP.news_default_aspx.__BuildControl__control14()' to access LinkDemand protected method 'KaspidPager.WebControls.UrlRewriteNextPreviousPagerField..ctor()' failed.  Methods must be security critical or security safe-critical to satisfy a LinkDemand.]
   ASP.news_default_aspx.__BuildControl__control14() in e:\vhosts\cfp-co.com\httpdocs\cfp-co.com\news\Default.aspx:77
   ASP.news_default_aspx.__BuildControl__control13(DataPagerFieldCollection __ctrl) in e:\vhosts\cfp-co.com\httpdocs\cfp-co.com\news\Default.aspx:75
   ASP.news_default_aspx.__BuildControldpNews() in e:\vhosts\cfp-co.com\httpdocs\cfp-co.com\news\Default.aspx:75
   ASP.news_default_aspx.__BuildControlContent4(Control __ctrl) in e:\vhosts\cfp-co.com\httpdocs\cfp-co.com\news\Default.aspx:18
   System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template) +108
   ASP.inside_master.__BuildControlContent() in e:\vhosts\cfp-co.com\httpdocs\cfp-co.com\inside.master:18
   ASP.inside_master.__BuildControlContent2(Control __ctrl) in e:\vhosts\cfp-co.com\httpdocs\cfp-co.com\inside.master:8
   System.Web.UI.MasterPage.InstantiateInContentPlaceHolder(Control contentPlaceHolder, ITemplate template) +108
   ASP.main_master.__BuildControlContent() in e:\vhosts\cfp-co.com\httpdocs\cfp-co.com\main.master:198
   ASP.main_master.__BuildControlform1() in e:\vhosts\cfp-co.com\httpdocs\cfp-co.com\main.master:29
   ASP.main_master.__BuildControlTree(main_master __ctrl) in e:\vhosts\cfp-co.com\httpdocs\cfp-co.com\main.master:1
   ASP.main_master.FrameworkInitialize() in e:\vhosts\cfp-co.com\httpdocs\cfp-co.com\main.master.cs:912308
   System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +1322
   System.Web.UI.MasterPage.get_Master() +66
   System.Web.UI.MasterPage.ApplyMasterRecursive(MasterPage master, IList appliedMasterFilePaths) +24
   System.Web.UI.Page.ApplyMasterPage() +166
   System.Web.UI.Page.PerformPreInit() +65
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +335


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4676.0