troubleshooting service errors


Is there any way to troubleshoot service errors:
Can one obtain details of an error when a sevice.Execute call returns "Server was unable to process request."?  
 
Larry TrimbleAsked:
Who is Participating?
 
Aftab_KhateebConnect With a Mentor Commented:
You could get more detailed error info with stacktrace or sometimes with innerException method

catch (System.Web.Services.Protocols.SoapException ex)
{
string stacktrace = ex.StackTrace.ToString();
string innerexception = ex.innerExceptionToString();

//probably you could write these two in a log file
}
catch (Exception ex)
{
string excp = ex.StackTrace.ToString();
}
0
 
crm_infoCommented:
I'm not exactly sure what you're looking for, but here are two things to try:
(1) Turn on detailed error reporting:
(a) In your CRM website (found either under inetpub or ProgramFiles/CRM4/CRMWeb ... names have been abbreviated to protect the busy) edit the web.config file
(b) search for "Show Developer Errors"
(c) Change the DevErrors key to "On"
(d) Save the web.config
(e) Restart IIS
(f) See if you get a more detailed error report when your error happens again
(2) Check the event log on your server:
(a) Start | Admin Tools | Event Viewer
(b) You probably want the application event viewer
 
Let me know if that gets you what you need.
0
 
Biffster007Commented:
Hi,

Yes there is.

Wrap your execute command in a try catch statement and instead of catching the exception you catch the soap exception as follows:

             try
            {
                RetrieveMultipleResponse response = (RetrieveMultipleResponse)crmServ.Execute(request);
                //Do something here
            }
            catch (System.Web.Services.Protocols.SoapException ex)
            {
                string errorMessage = ex.Message.ToString();
                //Handle the error
            }

There are other properties of the message you can check to ascertain the problem as well.

Cheers,
MH
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.