Hi every one,
I have surfed Internet for a long time but I could not find any answer yet !
I wrote a simple plugin to connect to sql server database, It works when I register it (isolation mode is non), but when I debug it in Visual Studio I get below error !
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Detail: <OrganizationServiceFault xmlns="schemas.microsoft.com/.../Contracts" xmlns:i="www.w3.org/.../XMLSchema-instance">
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:a="schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<a:key>CallStack</a:key>
<a:value i:type="b:string" xmlns:b="www.w3.org/.../XMLSchema"> at MyFirstPlugin.MyFirstPlugin.Execute(IServiceProvider serviceProvider)
at PluginProfiler.Library.PluginAppDomainProxy.ExecuteCore(Stopwatch watch, ProfilerExecutionReport report, Object instance, Object executionParameter)
at PluginProfiler.Library.AppDomainProxy.Execute(ProfilerExecutionConfiguration configuration, ProfilerExecutionReport report)</a:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.</Message>
<Timestamp>2018-08-28T06:27:09.0999149Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>
I don't know how to fix this issue.
Could you please help me to find resolution ?
Best regards
*This post is locked for comments