-
You can change your service configuration in InitializeService() method
public class MrSophisticatedServer: DataService<TestEntities> { public static void InitializeService(DataServiceConfiguration config) { // Make service to report errors in a nice way - doesn't really help.... config.UseVerboseErrors = true; .... } }
NOTE: There is one problem with this method. It does not work if your service (for some ridiculous reason) is not initialized. Basically, something goes wrong before InitializeService() is called. In this case use method 2 or 3 below. -
Add this attribute before your data service class
[System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)]
-
Add the following to your Web.config
Thursday, July 25, 2013
Enable Verbosely Errors in WCF Data Service
In case you want to see some additional info about the occurred exception (+ its stack trace). There are 3 ways to do this:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment