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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Call an external Web Service from Plugin - Dynamics crm ONLINE

(0) ShareShare
ReportReport
Posted on by 510

Hi all.

I'm facing a Permission error when i try to call an external WebService from my plugin.

Notes:
1. The web service was developed by another company and they said that they could not put a friendly name (dns) for this url
2. The web service is on IP format (http://200.279.18......).

So, for a temporary solution, i did a Windows Scheduler console APP that runs every 1min calling the Web Service and update the Quote entity. But i need this web service executing on real time.

Any help?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Shidin Haridas Profile Picture
    3,499 on at

    A couple of questions

    1. Which version of CRM are you using? How is the plugin registered?

    2. Is your CRM tenant using https? If yes, a call to a http service will be blocked, due to security issues.

  • Suggested answer
    Community Member Profile Picture
    on at

    What kind of errors,

    Can you write here the text of the error catched in your Plugin?

    Otherwise if it works in a console app, so it can work in a plugin.

    Best Regards,

  • HenriquePalomo Profile Picture
    510 on at

    @Shidin Haridas
    1. Dynamics 365

    1. Sandbox mode - Update pre operation

    2. Yes, it's using https. I'm using a dynamics 365 avaiable version.

  • HenriquePalomo Profile Picture
    510 on at

    @Youssef Khalfalli
    System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

    I don't know if your affirmative is correct, because the Console App is executing on my windows server and the plugin executes from cloud (SandBox).

  • Suggested answer
    jlattimer Profile Picture
    24,564 on at

    You can't use an IP address when calling a web service from a plug-in in CRM Online - needs a DNS name

    https://msdn.microsoft.com/en-us/library/gg334752.aspx - Web Access

  • Verified answer
    HenriquePalomo Profile Picture
    510 on at

    @Jason Lattimer

    Thanks, i didn't see this page before.

    I will try to do a intermediary Web Service, it will be:

    1. Plugin call my custom Web Service

    2. My Web Service call the another company Web Service.

    If it works, i will answer here.

  • Community Member Profile Picture
    on at

    did u implemented these solution, if yes please let me know.

  • Suggested answer
    HenriquePalomo Profile Picture
    510 on at

    I'm sorry, i forgot to answer here.

    Yes, the solution below  works well considering that the company can't put a DNS on their web service ip adress

    1. Plugin call my custom Web Service

    2. My Web Service call the another company Web Service.

  • Community Member Profile Picture
    on at

    can  u please provide me sample code and Architecture to my email id raveendrareddy.cs@gmail.com

  • HenriquePalomo Profile Picture
    510 on at

    Ok, i will send you.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans