An error occurred while processing this request – WCF Data Service

In some of the operational in WCF Data Service you have hit an error message “An error occurred while processing this request”.

WCFDSError

This error message is not useful. You have to click View Detail to view the InnerException.

WCFDSError1

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.

WCFDSError2

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);

About these ads

About chanmingman

Ming Man is a senior manager for a development company. With 20 years of experience in the IT field, he has developed system using Clipper, COBOL, VB5, VB6, VB.NET, Java and C #. He is familiar with the N-Tier design of business application and is also an expert with database experience in MS SQL, Oracle and AS 400.
This entry was posted in .Net. Bookmark the permalink.

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 )

Connecting to %s