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)

CRM WebAPI Unknow Error

(1) ShareShare
ReportReport
Posted on by

HI,

In new CRM2016 SP1, im trying to use the CRM WebAPI

https://myserver/myorg/api/data/v8.1/

And im having this error: "Unknow Error"

 

  1. Error Details: Invalid URI: The hostname could not be parsed.
  2. RequestUri:
    /MYORG/api/data/v8.1/

I tried this but it doesnt solve the issue: https://support.microsoft.com/en-us/help/896861/you-receive-error-401.1-when-you-browse-a-web-site-that-uses-integrated-authentication-and-is-hosted-on-iis-5.1-or-a-later-version

Note: Im using CRM 2016 on premises, F5 load balance, 2 front-ends.

*This post is locked for comments

I have the same question (0)
  • Andreas Cieslik Profile Picture
    9,267 on at
    RE: CRM WebAPI Unknow Error

    When you go to Settings -> Customizations > Ressources, is this URL to the WEB API the same as you have tried to use?

  • Community Member Profile Picture
    on at
    RE: CRM WebAPI Unknow Error

    Hi Andreas,

    Yes, it is exactly the same URL. All the URls works, including server/.../v8.1

    I have been trying to debug and trace the error, but the only thing i get is: Invalid URI: The hostname could not be parsed

  • Suggested answer
    Andreas Cieslik Profile Picture
    9,267 on at
    RE: CRM WebAPI Unknow Error

    Have you changed the host name on IIS for the CRM site binding?

    Also check this:

    If you log onto the CRM server and launch the Deployment Manager.

    On the left side right click "Microsoft Dynamic CRM" top level node and click Properties.

    In the dialog click the web address tab. You should see the host names in this tab, which you can now change to the FQDNS host name.

    Maybe afterwards it will work.

  • Community Member Profile Picture
    on at
    RE: CRM WebAPI Unknow Error

    I already checked that.

    So just to understand, our CRM url is: crm.company.com/organization

    Cluster name: crm. company.com

    IIIS Binding is port 80, with server (crm.company.com) added.

    Deployment Properties url: crm. company.com (HTTPS, use NLB)

    A F5 Load balancer encrypt to HTTPS traffic comming from the client, and from F5 to CRM servers is HTTP. F5 just redirect the traffic to the 2 front-ends.

    That could be the cause, but i cant find any info in tracing, or maybe some bug

  • Suggested answer
    Andreas Cieslik Profile Picture
    9,267 on at
    RE: CRM WebAPI Unknow Error

    I strongly recommend to change the binding to IIS and to use HTTPS also for the internal traffic.

    The application will gain performance with SSL and your internal traffic is secured:

    blogs.msdn.microsoft.com/.../enable-wcf-compression-ssl-to-improve-crm-2013-network-performance

    Try to put your Load Balancer in SSL-pass through mode and make sure CRM Server has the right certificates and bindings + deployment manager set up.

  • Community Member Profile Picture
    on at
    RE: CRM WebAPI Unknow Error

    HI,

    in our Deploy, the CRM servers are in internal network and F5 does all the SSL. CRM servers recieves X-Forwarded-Proto:https. It is part of a corporate design where most of the applications (CRM, Sharepoint, Web apps) use F5. CRM Deploy with F5 is supported.

    CRM performs quite well and it is only the WEB API the part i cant make it work.

    But i dont think this explain the error : Invalid URI: The hostname could not be parsed, and i want to believe is some kind of bug.

  • ashlega Profile Picture
    34,477 on at
    RE: CRM WebAPI Unknow Error

    Hi,

     did you try entering that web API url directly in the browser? Are you getting the same error? Can you open Dynamics using the same browser window?

  • Community Member Profile Picture
    on at
    RE: CRM WebAPI Unknow Error

    Hi Alex,

    Yes, i try with the CRM web API in the same browser i signed in into my crm.

    Im getting this error both from chrome and explorer and also calling from a custom javascript. But the discovery URL works.

    I did a tracing too, and i can see in the server logs same error.

  • ashlega Profile Picture
    34,477 on at
    RE: CRM WebAPI Unknow Error

    Hi Andrew,

     I don't know if it's too complicated to try.. and F5 is not what I work with all the time, to say the least.. but I would try to make sure it's, actually, a CRM problem:

    - Create a different web site (load balanced, configured similar to CRM.. maybe use a different host name.. or a different port), just have 1 static page there. Basically, replicate the same configuration just for a different site which has nothing but a statis html page

    - Make sure it works

    - Then move that page to a subfolder (like api..), and see if it works then

     Really what I'm wondering is whether those F5 rules you have set up to redirect traffic from HTTPS to HTTP etc are working correctly when the url is more complex.

  • Community Member Profile Picture
    on at
    RE: CRM WebAPI Unknow Error

    Hi,

    I made a trace and i found this:

    >FileExists ~/api/data returning False.

    [2017-06-22 11:31:44.127] Process: w3wp |Organization:8353ec38-860d-e711-80e9-005056a43f80 |Thread:   23 |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose |ReqId: ee24c3ac-8fdb-4fb8-9460-22e60ea38851 | RouteCollection.GetRouteData  ilOffset = 0x41

    >DirectoryExists ~/api/data returning False.

    Silly me, i didnt check if there is a folder under CRM Web Site called, "/api/data".

    Im running CRM Version 8.1.0000.0381 and it is strange the lack of the API.. , i didnt see in documentation some extra steps to install the web API.

    do you have this directory /api/data/?

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
Community Member Profile Picture

Community Member 2

#1
UllrSki Profile Picture

UllrSki 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans