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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Call WEB SERVICE IN PLUGIN issue The provided uri did not return any Service Endpoints!

(0) ShareShare
ReportReport
Posted on by 5

hello comunity 

Actually ,I try to call a web service using plugin on save event But I get this error 

- The provided uri did not return any Service Endpoints!

32175.Capture.PNG

Some action already tried (CRM 2015 on premises )  :

  1. Restart async service
  2. restart IIS
  3. Recycle crmapppool

Result ==> The issue still occurs 

Does any one face the same problem  ? 

Please let me know !!

*This post is locked for comments

I have the same question (0)
  • gdas Profile Picture
    50,091 Moderator on at

    Hi,

    Please check trace log whether you are using correct endpoint url.

    Are you able to call the web service endpoint using soap UI?

  • Kokulan Profile Picture
    18,054 on at

    Hi

    On top of what Goutam suggested/asked, couldyou share the bit of code that calls the web service

    Is this external service or are you trying to call the CRM WCF service?

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    The steps you have performed like reset iis, async service, crmapppool are relevant when you call CRM web services outside of CRM. You have mentioned you are calling web services from plugin so I will assume you are calling some external web service which means you need to ensure that that web service is accessible from your CRM box.

    Also to rule out issue with plugin calling the web service, ensure that you are able to connect and get a response from that service using a console application from your local as well as from your crm box.

    Hope this helps.

  • Suggested answer
    PranavShroti Profile Picture
    4,510 on at

    Hi- Did you try checking your web service outside Plugin, you can use utilities like postman  (link below) to check your web services.

    learning.getpostman.com/.../making_soap_requests

    Regards,

    Pranav

    If found useful, please mark the answer as verified

  • Jamil Lamyae Profile Picture
    5 on at

    Thank you all for your responses.

    The web service I used is deployed in the same server as CRM and respond well 

    3087822.Capture.PNG

    here is the code I use

    public int POST(string url, string jsonContent, string ApiKey)
    {
    int resp = 0;
    int remainingTries = 3;
    try
    {
    while (remainingTries > 0 && resp!=200)
    {

    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
    request.Method = "POST";
    request.Headers.Add("Authorization", "Basic " + ApiKey);
    System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
    Byte[] byteArray = encoding.GetBytes(jsonContent);
    request.ContentLength = byteArray.Length;
    request.ContentType = @"application/json";

    using (Stream dataStream = request.GetRequestStream())
    {
    dataStream.Write(byteArray, 0, byteArray.Length);
    using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
    {

    Stream responseStream = response.GetResponseStream();
    StreamReader myStreamReader = new StreamReader(responseStream);
    var serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
    var jsonObject = serializer.DeserializeObject(myStreamReader.ReadToEnd());

    resp = (int)response.StatusCode;
    }

    }
    }

    remainingTries--;
    }
    catch (WebException we)
    {
    HttpWebResponse response = (HttpWebResponse)we.Response;
    CommonUtils.WriteToEventLog(1, this.ToString(), EventLogLevel.Info, we.ToString(),"echec ws authentication");
    if (response != null) { resp = (int)response.StatusCode; } else { resp = 0; };
    }
    return resp;

    }

  • Rawish Kumar Profile Picture
    13,758 on at

    is your web service accessible from outside of the box/VM just like CRM?

  • Jamil Lamyae Profile Picture
    5 on at

    yes

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans