The Microsoft Dynamics CRM Blog
News and views from the Microsoft Dynamics CRM Team

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

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

  • Comments 0

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>urn:crm:dynamics.com</a:Address>  to 
<a:Address>urn:crm4:dynamics.com</a:Address>

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 urn:crm:dynamics.com. 
// Replace crm with crm4 for Europe & crm5 for Asia.
string URNAddress = "urn:crm:dynamics.com";
if (CRMUrl.IndexOf("crm4.dynamics.com") != -1)
URNAddress = "urn:crm4:dynamics.com";
if (CRMUrl.IndexOf("crm5.dynamics.com") != -1)
URNAddress = "urn:crm5:dynamics.com";

You can download the updated code sample here:
http://code.msdn.microsoft.com/CRM-Online-2011-WebServices-14913a16

All is well again!

Girish Raja



Leave a Comment
  • Please add 3 and 8 and type the answer here:
  • Post