Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Avoiding connecting XRMServices/2011 in .net console applications

(0) ShareShare
ReportReport
Posted on by 10

Hello,

I am using ClientServer authentication to avoid using WS-Trust, which will be deprecated.

Before I used a connection string with the url like this:

connectionString="AuthType=Office365;Username=****;Password=*******;Url=">something.dynamics.com/.../2011"

I have noticed that the url uses another feature that is also going to be deprecated(/XRMServices/2011).

My surprise comes when using clientserver, the object that get the connection have the following property in data:

CrmConnectOrgUriActual

{https://something.dynamics.com/XRMServices/2011/Organization.svc/web?SDKClientVersion=9.0.44.892}

My current connection string:

connectionString="AuthType=ClientSecret; Url=something.dynamics.com;  ClientId= ********;ClientSecret=********"

I'm not sure this connection method will work when Microsoft doesn't support XRMServices/2011 this year.

Is ClientServer authentication

  • Verified answer
    Guido Preite Profile Picture
    Guido Preite 54,069 Super User 2024 Season 1 on at
    RE: Avoiding connecting XRMServices/2011 in .net console applications

    the assemblies internally are still using that endpoint, when they will not use that endpoint you will need to upgrade the assemblies (if required). Using the SDK your C# code is not affected by which endpoint internally the SDK is using.

  • fgdopazo Profile Picture
    fgdopazo 10 on at
    RE: Avoiding connecting XRMServices/2011 in .net console applications

    Hi,

    in this case, as I am using ClientSecret authentication, the object OrganizationServiceProxy is null. The OrganizationWebProxyClient object is the one that have the information, and the Endpoint property have /XRMServices/2011/Organization.svc/web again.

    I have the last assemblies and no custom endpoints.

    I am about to think that it is an internal behavior of the assemblies.

  • Verified answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: Avoiding connecting XRMServices/2011 in .net console applications

    Hello,

    It's possible that the CrmConnectOrgUriActual property is returning the old endpoint URL even when you're using the latest assemblies, this may be an internal behavior of the Microsoft.Xrm.Tooling.Connector assembly.

    You can try to use the OrganizationServiceProxy.Endpoint property instead of the CrmConnectOrgUriActual property, this property will give you the correct endpoint url which you have provided in the connection string.

    It's also worth checking if your organization has any custom endpoints that are different from the default one provided by Microsoft.

    Another thing you can try is to update the Microsoft.Xrm.Tooling.Connector assembly to the latest version available. As of my knowledge cutoff, the latest version is 9.2.0.5, this might solve the issue.

  • fgdopazo Profile Picture
    fgdopazo 10 on at
    RE: Avoiding connecting XRMServices/2011 in .net console applications

    Hi Guido,

    thank you for the response.

    I have no issues connecting to my instance.

    I'm trying a same connection from a new console application, with the latest assemblies and I get the same property.

    CrmConnectOrgUriActual

    {something.dynamics.com/.../web

    I do not know if this is something internal of assemblies.

    Microsoft.Xrm.Tooling.Connector -> version 4.0.0.0

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,069 Super User 2024 Season 1 on at
    RE: Avoiding use XRMServices/2011/Organization.svc in console applications

    the connection string you are using is correct, if you will have issues connecting to your instance the first step will be to update the assemblies.

  • fgdopazo Profile Picture
    fgdopazo 10 on at
    Avoiding use XRMServices/2011/Organization.svc in console applications

    Hello,

    I am using ClientServer authentication to avoid using WS-Trust, which will be deprecated.

    Before I used a connection string with the url like this:

    connectionString="AuthType=Office365;Username=****;Password=*******;Url=">something.dynamics.com/.../2011"

    I have noticed that the url uses another feature that is also going to be deprecated(/XRMServices/2011).

    My surprise comes when using clientserver, the object that get the connection have the following property in data:

    CrmConnectOrgUriActual

    {https://something.dynamics.com/XRMServices/2011/Organization.svc/web?SDKClientVersion=9.0.44.892}

    My current connection string:

    connectionString="AuthType=ClientSecret; Url=something.dynamics.com;  ClientId= ********;ClientSecret=********"

    I'm not sure this connection method will work when Microsoft doesn't support XRMServices/2011 this year.

    Is ClientServer authentication sure for my purpose?

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,379 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans