CRM Online 2011 Web Services SOAP Sample now ready for Europe & Asia

Updated 26th June 2012: The sample has been modified to use the Windows Live login URLs & URNs that is dynamically sent through the discovery service. Many thanks to Ryan Lo from Marketo for providing the updated sample. This new update makes this post obsolete!

The recent code sample I published on Connecting to CRM Online 2011 Web Services using SOAP Requests Only was well received by many people however a few developers from Europe & Asia mentioned that they were getting (500) Internal Server Error when they were trying out the code. I then realized that CRM 2011 Web Service URLs had a different format in Europe & Asia which helped me to find the culprit.

I signed up for a CRMOnline European trial account and putting the SDK sample under Fiddler inspection revealed that it was a minor change within one of the XML fragments. That’s it, seriously!

<a:Address></a:Address>  to 

Obviously crm4 is used in our European datacenter and crm5 is used in our Asian datacenter so I had to modify the code to use the appropriate URN address.

// Create the URN address of the format 
// Replace crm with crm4 for Europe & crm5 for Asia.
string URNAddress = "";
if (CRMUrl.IndexOf("") != -1)
URNAddress = "";
if (CRMUrl.IndexOf("") != -1)
URNAddress = "";

You can download the updated code sample here:

All is well again!

Comments (9)

  1. guest says:

    thank you!

  2. Pradip says:

    Hi Girish,

    I am new to CRM2011. I have a query here,

    Cann't we connect to crm online 2011 using sdks? Please advise.



  3. Girish Raja says:


    The CRM 2011 SDK has samples in .NET with dependancies on certain assemblies. The objective here is to show connectivity to CRM using SOAP endpoints only. Such samples can then be easily translated to other programming languages and environments.

  4. Saira says:

    Thanks Girish, this application works well in desktop, but it fails to work on windows phone. We need to create a CRM Online 2011 Web Services SOAP application for Windows phone. Is there any sample available which demonstrate utilizing CRM webservices in windows mobile?

    Thanks in advance.



  5. Javier says:

    It´s ok to get entities. Thanks a lot. To go deeper, Do you have a soap sample to insert and update an entity?

  6. Hi

    can anyone please publish comleted source code.

    Everone is posting recommendations but I havent seen any working example.

    I d like to creta new contact in Dynamics CRM Online from html/php form.

    Thanks a lot for any reply

  7. Jai says:

    I tried for Create, Update and Delete. It does not work. The sampel works only for retrievemultiple (given in code).

    I captured Create soap using fiddler and added it to project. But it does not work.

    Any help is appreciated.

  8. Ciroc says:

    i tried to download the code and didnt find any links, the doesnt show link to download, please help.


Skip to main content