Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Dynamics 365 Plugin : How to call a web request

Posted on by 250

Hello everyone my name is Taniguchi.

I trying to retrieve information from itb360 database using a get request consuming an url but in the plugin when i try to get the response its shows me an error but i used the same code in console application and worked just fine do i have to do some configuration to be able to do webrequest in dynamics 365 plugin?

mycode:

Uri url = new Uri("">dbenterprise.itb360.com.br/.../28017459000117");

        WebRequest request = WebRequest.Create(url);
        request.Method = HttpMethod.Get.Method;
        var response = request.GetResponse();

the error on get response line:

System.Security.SecurityException HResult=0x8013150A Message=Falha na solicitação da permissão de tipo 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

  • TaniSantos Profile Picture
    TaniSantos 250 on at
    RE: Dynamics 365 Plugin : How to call a web request

    Thanks so much for replying, the plugin registration is not allowing to set isolation mode to none only to sandbox, do you know what can i do ?

  • Suggested answer
    Anks27 Profile Picture
    Anks27 1,083 on at
    RE: Dynamics 365 Plugin : How to call a web request

    Hello TaniSantos,

    Open the plugin registration tool and make sure that the isolation mode is set to none not sandbox.

    Signed, Sealed and Delivered.

     

    Don't forget to help the community by Verifying the answer and Like it if your question has been answered. It will let others know that the topic has verified answer.

     

    Thanks & Regards,

    Ankit Shah(MCT-Microsoft Certified Trainer)

     

    Follow me on below

    LinkedIn:-  https://linkedin.com/in/dynamicpower101/

    Twitter:-    https://twitter.com/Dynamicpower101

    Facebook:- https://facebook.com/DynamicPower101/

    Telegram:- https://t.me/dynamicpower101

  • Suggested answer
    Inogic Profile Picture
    Inogic 24,094 on at
    RE: Dynamics 365 Plugin : How to call a web request
    Hi Taniguchi,
    The problem is when you try to run the “Web Request” code in plugins and try to access the token, you will get a security exception because the online plugins run in sandbox mode.
    You can refer to the below blog for more details:
     
    Hope this helps!

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans