using in sharepoint application pages - throws security exception
System.Reflection.TargetInvocationException was unhandled by user code
Message=Property accessor 'End_Date' on object 'PAFEManagement.EventsService.SubEvent' threw the following exception:'That assembly does not allow partially trusted callers.'
Source=System
StackTrace:
at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)
at System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName)
at System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName, String format)
at DayPilot.Web.Ui.DayPilotScheduler.PerformDataBinding(IEnumerable retrievedData)
at DayPilot.Web.Ui.DayPilotScheduler.OnDataSourceViewSelectCallback(IEnumerable retrievedData)
at DayPilot.Web.Ui.DayPilotScheduler.PerformSelect()
at PAFEManagement.ControlTemplates.PAFEManagement.Calendar.Page_Load(Object sender, EventArgs e)
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException: System.Security.SecurityException
Message=That assembly does not allow partially trusted callers.
Source=mscorlib
StackTrace:
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Reflection.MethodBase.PerformSecurityCheck(Object obj, RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)
InnerException: