
Hello, we have a problem to debug a plugin in dll which is merged with more than one dll by ILMerge. There is a NewtonSoft.dll merged to this dll and when we are trying to debug some plugin from this dll using the profiler in plugin registration tool we got this error:
System.Security.SecurityException
Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Delegate.DelegateConstruct(Object target, IntPtr slot)
at Newtonsoft.Json.Utilities.LateBoundReflectionDelegateFactory.CreateParametrizedConstructor(MethodBase method)
at Newtonsoft.Json.Utilities.ReflectionObject.Create(Type t, MethodBase creator, String[] memberNames)
at Newtonsoft.Json.Converters.KeyValuePairConverter.InitializeReflectionObject(Type t)
at Newtonsoft.Json.Utilities.ThreadSafeStore`2.AddValue(TKey key)
at Newtonsoft.Json.Utilities.ThreadSafeStore`2.Get(TKey key)
at Newtonsoft.Json.Converters.KeyValuePairConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)
at Newtonsoft.Json.JsonConvert.SerializeObject(Object value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.SerializeObject(Object value)
at LogicPoint.CrmCore.LoggerHelper.SerializeObjectToXml(Object objToSerialize)
at LogicPoint.CrmCore.LoggerHelper.Log(LogSeverityEnum level, LogEntry log)
at LogicPoint.CrmCore.LoggerHelper.Log(LogSeverityEnum level, LogEntry log, Object content)
at LogicPoint.DevDemo.Plugins.AccountPlugin.Post_ExecuteAccountPlugin(LocalPluginContext localContext)
at LogicPoint.CrmCore.Plugin.Execute(IServiceProvider serviceProvider)
Where is the problem?
Thanks
*This post is locked for comments
I have the same question (0)Hi,
check in the settings tab of the Plugin Profiler you have selected 'Sandbox'
Hope this helps,
Scott