December 30, 2009 | In: Microsoft CRM
Microsoft CRM: “Server is unable to process request.”
If you’ve done any good amount of work using the Microsoft CRM Web Service you have most certainly been told on one occasion or another that the “Server is unable to process request”.
What does this even mean? Is the server down? Does my user not have enough permission? Did I send the right request? At some point Microsoft could replace that message with “Uh, somethin’ ain’t right boss”. That would be equally informative and infinitely more amusing.
But there is hope. If you examine the exception you’ll notice it’s a Soap Exception. We can examine the SoapException.Detail.OuterXML to see more information – messages like “Invalid user” or “The attribute ‘xxxxx’ does not exist on account”.
The obligatory code sample:
try {
CrmService s = GetMyService();
s.Execute(SomeRequest);
}
catch (System.Web.Protocols.SoapException soap_ex)
{
Console.WriteLine(soap_ex.Detail.OuterXML);
}
catch(System.Exception ex)
{
Console.WriteLine(ex.Message);
}
I basically divide my work with Microosft CRM into two eras – the first era I call trial and error. The second I call SoapException.Detail. Let’s just say the second era was far more productive.