oData call debugging.

 

OData_logo_MS_small

If you find yourself looking at error responses from the WCF data service  that only tell you ‘An error occurred while processing this request’ from a WCF Data Service then…

Just add:

            config.UseVerboseErrors = true;

to the method:

public static void InitializeService(DataServiceConfiguration config)

And you will get the full details of why your data service isn’t doing what you want it to.

If you want you can also override the HandleException method to capture the exception on the server:

        protected override void HandleException(HandleExceptionArgs args)
        {
            base.HandleException(args);

            //Do something to handle the exception.
        }

 

Hope this helps – sure has helped me!

Advertisements
Tagged with: , , ,
Posted in DataService, oData, Silverlight, WP7
One comment on “oData call debugging.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: