CRM Blog

Server Was Unable To Process Request - Generic Error Message

by Danny Varghese 03.11.08

Issue

Often times, developers see the generic error message “server was unable to process request” that gets thrown when executing a callout in Microsoft CRM 3.0.  This message is a generic message that gets thrown to the windows event log.  Unfortunately, diagnosis of the actual problem can be very difficult from these types of messages. 

How To Diagnose A Bit Better

The best way, I’ve found is to trap this type of exception in your code, and print out the message, stack trace of the exception and the “inner exception.”  The specific exception thrown in this case is the System.Web.Services.Protocols.SoapException (http://msdn2.microsoft.com/en-us/library/system.web.services.protocols.soapexception.aspx).  The “outer exception” contains the “server was unable to process request” exception, but the “inner exception” contains a more detailed description (NOTE:  sometimes the inner exception may not be descriptive enough, but it should point you in the right direction).  An example of an inner exception would be “object not set to a reference,” which often times indicates trying to perform an action on a null object.

Code Snippet

Below is an illustration of how to trap that exception and print it out.

try

{

     //do something here

}

catch (SoapException se)

{

     Console.WriteLine(se.Message + “ “ + se.StackTrace);

     Console.WriteLine(se.InnerException.Message + “ “ + se.InnerException.StackTrace);

}

Filed under:

Comments

# Eran Yaron said on June 14, 2008 07:40 PM:

If it's a soap exception you can also try the soapEx.Detail.OuterXml to get some more information on what went wrong...

# Danny Varghese said on October 14, 2008 01:09 PM:

I'd also like to add with the Visual Studio debugging tool, you can also step into the program and quick watch or explore the exception.  This, I've found, to be the best method of figuring out truly what the issue is.

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Security Check
Please answer the simple math problem below.

(required)