You are implementing a WCF Data Service to expose data from a database named Northwind.
You create a class named NorthwindDataService that extends DataService. You add the following method:

public static void InitializeService(IDataServiceConfiguration config)

You need to ensure that client applications can read Customers entities and cannot access Products and Orders entities.

Which code segment should you add to the InitializeService method?

 Posted by Rajkatie on 8/31/2012 | Category: ADO.NET Interview questions | Views: 929 | Points: 40
Select from following answers:
  1. config.SetEntitySetAccessRule("Customers", ServiceOperationRights.AllRead);
  2. config.SetServiceOperationAccessRule("Products", EntitySetRights.None); config.SetServiceOperationAccessRule("Orders", EntitySetRights.None);
  3. config.SetEntitySetAccessRule("Products", ServiceOperationRights.None); config.SetEntitySetAccessRule("Orders", ServiceOperationRights.None);
  4. All Above

Show Correct Answer

Source: MeasureUp.Com | | Alert Moderator 

Comments or Responses

Login to post response