Feeds:
Posts
Comments

Posts Tagged ‘debug’

My service is broke-a$….er I mean my friend is having issues with his code and this is the link I sent him.

By default, Data Services don’t return information on what’s wrong when you try to execute some code, for example an update, against it. This is understandable: if you open up a data service on the web, you shouldn’t be returning all important information about entities in the underlying model.

However, when developing a Data Service, it might be handy to get a little more information than just “An error occurred while processing this request”. Here’s how to achieve this…

via Snowball – The Blog – Debugging ADO.NET Data Services.

Read Full Post »

Need to debug an ADO.NET Data Service?

Another interesting point has to do with error handling. The option for error handling is set during InitializeService. If an exception is thrown while InitializeService is being called, we don’t trust whatever was set on the configuration, and instead of the ADO.NET Data Service error handling kicking in, we’ll let the exception bubble out. Typically the service will be running as a WCF service, which means you’ll get the error page with the blue band on top (when viewed in a browser). To get detailed errors in this case, you can do something like this.

[System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)]

public class YourService : DataService

{ … }

via Marcelo’s WebLog : So Special – InitializeService in ADO.NET Data Services.

Read Full Post »