views:

109

answers:

1

I am trying to create a simple ADO.NET Data Service sample using CTP2. If I create a web site and add a ADO.NET Data Service Template and put all the code there everything works fine. However I would like to put all there code in a separate project and add it as a reference in my web project. And in my web project I would like to add the ADO.NET Data Service Template and just provide the class reference from the referenced assembly. I will just put the security related code in InitializeService method.

Has anyone tried doing this? When I am trying to do this the project gets compiled without any problem, however I am getting the error "The server encountered an error processing the request. See server logs for more details.".

+1  A: 

This should absolutely work.

The most likely reason for failure is that you are exposing an Entity Framework ObjectContext from another assembly, and you haven't copied the EF connection string from the other app.config into the web.config (this is required).

Hope this helps

Alex

Alex James

related questions