I am doing a simple WCF Data service on top of LINQ to SQL data context. My svc.cs file is very simple. However, when I run it from VS2012, I get a generic "Request Error" with no more information. How can I troubleshoot/resolve it?
using System;
using System.Collections.Generic;
using System.Data.Services;
using System.Data.Services.Common;
using System.Linq;
using System.ServiceModel.Web;
using System.Web;
using MyApp.Business.Pmw.DataAccess;
namespace MyApp.DataService
{
public class SystemData : DataService<PmwModelDataContext>
{
// This method is called only once to initialize service-wide policies.
public static void InitializeService(DataServiceConfiguration config)
{
config.SetEntitySetAccessRule("SysParam", EntitySetRights.ReadMultiple);
// TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
// Examples:
// config.SetEntitySetAccessRule("MyEntityset", EntitySetRights.AllRead);
// config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;
}
}
}