web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

while debugging a plugin getting the permission issue.

(0) ShareShare
ReportReport
Posted on by 6

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

I have the same question (0)
  • Gopalan Bhuvanesh Profile Picture
    11,401 on at
    RE: while debugging a plugin getting the permission issue.

    Hi

    Are you trying to access any DB from your plugin?

    What kind of operations you do in your plugin?

  • David Jennaway Profile Picture
    14,065 on at
    RE: while debugging a plugin getting the permission issue.

    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

  • EmployeeOcta Profile Picture
    6 on at
    RE: while debugging a plugin getting the permission issue.

    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?

  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at
    RE: while debugging a plugin getting the permission issue.

    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.

    https://technet.microsoft.com/library/hh699751.aspx

    https://msdn.microsoft.com/en-us/library/gg309416.aspx

  • EmployeeOcta Profile Picture
    6 on at
    RE: while debugging a plugin getting the permission issue.

    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.

  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at
    RE: while debugging a plugin getting the permission issue.

    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).

    1. Start Internet Information Services (IIS) Manager.
    2. Click Application Pools, right-click CRMAppPool, and then click Advanced Settings.

    3. Click the identity account next to Identity and then click the ellipsis (…).

  • Gopalan Bhuvanesh Profile Picture
    11,401 on at
    RE: while debugging a plugin getting the permission issue.

    Hi

    I am not sure about the design.

    Why do you want to get the data from another DB (directly), on the fly?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans