Server Error in '/' Application.

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: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Source Error:


Line 55:         {
Line 56:             string tmpJson = tmpStreamreader.ReadToEnd();
Line 57:             tmpItemMediaView = JsonConvert.DeserializeObject<List<ItemMediaView>>(tmpJson);
Line 58:         }
Line 59: 

Source File: g:\pleskvhosts\shadlecontracting.com\httpdocs\service.aspx.cs    Line: 57

Stack Trace:


[SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
   System.Delegate.DelegateConstruct(Object target, IntPtr slot) +0
   Newtonsoft.Json.Utilities.LateBoundReflectionDelegateFactory.CreateParametrizedConstructor(MethodBase method) +88
   Newtonsoft.Json.Utilities.CollectionUtils.ResolveEnumableCollectionConstructor(Type collectionType, Type collectionItemType) +187
   Newtonsoft.Json.Serialization.JsonArrayContract..ctor(Type underlyingType) +373
   Newtonsoft.Json.Serialization.DefaultContractResolver.CreateArrayContract(Type objectType) +31
   Newtonsoft.Json.Serialization.DefaultContractResolver.CreateContract(Type objectType) +339
   Newtonsoft.Json.Serialization.DefaultContractResolver.ResolveContract(Type type) +114
   Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) +75
   Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) +210
   Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) +137
   Newtonsoft.Json.JsonConvert.DeserializeObject(String value, JsonSerializerSettings settings) +66
   Newtonsoft.Json.JsonConvert.DeserializeObject(String value) +42
   service.BuildItemMedia(Repeater rptGallery, String argJsonFileName) in g:\pleskvhosts\shadlecontracting.com\httpdocs\service.aspx.cs:57
   service.Page_Load(Object sender, EventArgs e) in g:\pleskvhosts\shadlecontracting.com\httpdocs\service.aspx.cs:22
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6796
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +250
   System.Web.UI.Page.ProcessRequest() +76
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +24
   System.Web.UI.Page.ProcessRequest(HttpContext context) +62
   ASP.service_aspx.ProcessRequest(HttpContext context) in App_Web_04heduyb.6.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +195
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


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