Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

while debugging a plugin getting the permission issue.

Posted on by

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

  • Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 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?

  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 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 ().

  • EmployeeOcta Profile Picture
    EmployeeOcta 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
    Gopalan Bhuvanesh 11,397 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
    EmployeeOcta 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?

  • David Jennaway Profile Picture
    David Jennaway 14,063 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

  • Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 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?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans