In some of the operational in WCF Data Service you have hit an error message “An error occurred while processing this request”.
This error message is not useful. You have to click View Detail to view the InnerException.
In my case I need to scroll to the right to see the complete message. To me I prefer to copy the error to the clipboard and paste it to notepad.
As you can from the picture above. The message is getting closer to the error but unfortunately it does not indicate exactly which line of the code is causing the error.
In my case it is caused by AllRead instead of All. So you can change from
config.SetEntitySetAccessRule(“*”, EntitySetRights.AllRead);
to
config.SetEntitySetAccessRule(“*”, EntitySetRights.All);