Hello All Experts,
While debugging a plugin getting below error.
Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
How to overcome this issue, can anyone help me resolving this.
*This post is locked for comments
Hi
I am not sure about the design.
Why do you want to get the data from another DB (directly), on the fly?
Hi
Request your DB manager to give permission for the AppPool (Service account).
The second link shows you how to find out the AppPool account (IIS server).
- Start Internet Information Services (IIS) Manager.
Click Application Pools, right-click CRMAppPool, and then click Advanced Settings.
Click the identity account next to Identity and then click the ellipsis (…).
Hello Gopalan,
How to get AppPool Account and set permission in the database.
which is the AppPool account which i can consider?
Guide me little more, i don't know this.
Hi
You need to give access permissions, for the Database, to the AppPool account.
Plug-ins not executed by either the sandbox or asynchronous service, execute under the security account that is specified on the Identity tab of the CRMAppPool Properties dialog box.
Hello Experts,
Yes i am trying to access the sql database, but plugin is not sandboxed.
still i am getting the same error.
how can i resolve this?
The error is a CodeAccess permission issue. The most likely cause is if you've registered the plugin in the Sandbox, as the Sandbox does not allow access to SQL.
For a plugin to access SQL, it needs to be registered outside of the sandbox
Hi
Are you trying to access any DB from your plugin?
What kind of operations you do in your plugin?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156