views:

929

answers:

2

I'm trying to add an ADO.NET data service to a vanilla ASP.NET-MVC project. Does anyone know if these technologies are compatible?

When I Ctrl+f5 the solution and visit the service URL all I get when is the very unhelpful "Request Error ... See server logs" page. Does the Development Web server even write any logs and if so where?

I guessed that routing may be the problem so I added:-

routes.IgnoreRoute("{service}.svc/{*pathInfo}");

in an attempt to fix this but that doesn't help.

I would rather not create a separate ASP.NET Web project just to host the data service. Are there other steps to addiing a Data service in an ASP.NET-MVC project that are not common to standard ASP.NET project?

+2  A: 

Hope this link will help you http://blog.davebouwman.net/CommentView,guid,3a38654f-1a25-44f7-81bd-38546e171dca.aspx

jalpesh
Thats pretty much a walk-through for what I've done. So at least it helps answer the question "can this even be acheived". However I'm still no closer to finding out why its not working for and there doesn't seem to be an diagnostics I can use to find out.
AnthonyWJones
+1  A: 

Did you place debugging atribute into service class ?

**[System.ServiceModel.ServiceBehavior(IncludeExceptionDetailInFaults = true)]**  
public class MyDataService : DataService<...>
{
    // This method is called only once to initialize service-wide policies.
    public static void InitializeService(IDataServiceConfiguration config)
    {
        // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
        // Examples:
        config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
        config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);


        **config.UseVerboseErrors = true;**
    }
MicMit
Thanks that gave me enough info to resolve the issue. It just goes to show that at times Rep means nothing, you were at Rep 1 when you answered where mine was 13K. :)
AnthonyWJones
The article and the source code may be useful to explore ASP.Net MVC and ADO.Net Data Services combination http://msdn.microsoft.com/en-au/magazine/dd727502.aspx
MicMit