If you set the [ServiceBehavior(IncludeExceptionDetailInFaults=true)] attribute in the service and set config.UseVerboseErrors to true , you will get a much clearer client-side error message. Be sure to remove these settings before proceeding with production, as this may lead to unintentional disclosure of information:
[ServiceBehavior(IncludeExceptionDetailInFaults = true)] public class FileService : DataService<FileContext> { public static void InitializeService(DataServiceConfiguration config) { config.UseVerboseErrors = true; config.SetEntitySetAccessRule("*", EntitySetRights.AllRead); config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3; } }
source share