Security Exception

Mar 1, 2013 at 12:22 AM
Hello Gemina,

I have used this tool before in a few on-premise environments and appreciate it very much.

This is the first time I have used it Online and it appears to register fine once I "unlock" the DLL.

RetreiveView appears to try to run and gives me warnings if I leave out any required attributes.
However, when I give it all of the required fields (and I have confirmed they are valid) it throws the following exception:

Plugin Trace:

[Crm2011LdgManager: Gemina.CRM2011.WF.LdgManager.AgRetrieveView]
[Crm2011LdgManager (1.7.0.1): Gemina.CRM2011.WF.LdgManager.AgRetrieveView]


Error Message:

Unhandled Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at System.Runtime.Serialization.XmlObjectSerializerContext.DemandSerializationFormatterPermission()
at WriteKeyValuePairOfstringanyTypeToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )
at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
at WriteAttributeCollectionToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract )
at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
at WriteEntityToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )
at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)
at Gemina.CRM2011.WF.LdgManager.AgCodeActivityBase.Serialize(Object obj)
at Gemina.CRM2011.WF.LdgManager.AgRetrieveView.SetOutputValues(Entity response, CodeActivityContext executionContext)
at Gemina.CRM2011.WF.LdgManager.AgRetrieveView.RetrieveUserQuery(String userQueryName, EntityReference userQueryOwner, String userQueryTargetEntity, Nullable`1 userQueryType, CodeActivityContext executionContext)
at Gemina.CRM2011.WF.LdgManager.AgRetrieveView.ExecuteBody(CodeActivityContext executionContext)
at Gemina.CRM2011.WF.LdgManager.AgCodeActivityBase.Execute(CodeActivityContext executionContext)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The Zone of the assembly that failed was:
MyComputer