When working with ADO.NET Data Services you might be suppressed how simple data entities can be exposed as services. However, when you start to dig deeper into framework by building of more complex code, you might be disappointed when you get errors like this one:
“The server encountered an error processing the request. See server logs for more details.”
One more nothing saying error? Yes it is, definitely
I figured out that following pattern could be helpful.
1. The EDMX file is out of sync with database.
2. The database is not reachable (invalid connection string or the IIS pool user has no permission to access the database)
3. Other issues.
To figure out what other issue could be I would recommend to use WCF Diagnostics and WCF Trace tool.
More about WCF tracing: http://developers.de/blogs/damir_dobric/archive/2009/03/24/using-of-wcf-trace.aspx and http://developers.de/blogs/damir_dobric/archive/2009/03/27/code-which-write-to-wcf-trace.aspx.
For example you can find errors like this one: Parameter 'c' of method 'SomeCustomOperationInMyService' on type ' is of type ‘Contact' but a type assignable from ‘Customer' is required.
Personally, I would like ADO.NET Data Services team to write out all error in the event log.Diagnostic tools helps a lot, but they are mostly more complex to use than Event Log. Such tools should be used to figure out real issues. But honestly, using of invalid connection string etc. in dev environment is such a trivial error which every admin should be able to fix, without of need to know anything about WCF and Service Model diagnostic.
Posted
Sep 14 2009, 12:07 AM
by
Damir Dobric