What should you do to ensure that only those client applications that provide credentials belonging to?

You are creating a distributed application by using Microsoft .NET Framework 3.5.
You use Windows Communication Foundation to create the application.
You plan to perform the following tasks:
Authenticate the client applications by using Microsoft ASP.NET membership provider.
Authorize the client applications by using Microsoft ASP.NET role provider.
You write the following code segment.

[ServiceContract]
public interface IService
{
[OperationContract]
void Remove(int id);
}
public class Service : IService
{
public void Remove(int id){ }
}

You need to ensure that only those client applications that provide credentials belonging to the AdminGroup role can access the Remove method.
What should you do?

You are creating a distributed application by using Microsoft .NET Framework 3.5.
You use Windows Communication Foundation to create the application.
You plan to perform the following tasks:
Authenticate the client applications by using Microsoft ASP.NET membership provider.
Authorize the client applications by using Microsoft ASP.NET role provider.
You write the following code segment.

[ServiceContract]
public interface IService
{
[OperationContract]
void Remove(int id);
}
public class Service : IService
{
public void Remove(int id){ }
}

You need to ensure that only those client applications that provide credentials belonging to the AdminGroup role can access the Remove method.
What should you do?

A.
Add the following attribute to the Remove method of the Service class.
[PrincipaIPermission(SecurityAction.Demand, Role=”AdminGroup”)]

B.
Add the following attribute to the Remove method of the IService interface.
[PrincipaIPermission(SecurityAction.Demand, Role=”AdminGroup”)]

C.
Add the following attribute to the Service class.
[PrincipaIPermission(SecurityAction.Demand, Name=”Remove”, Role=”AdminGroup”)]

D.
Add the following attribute to the Service class.
[PrincipaIPermission(SecurityAction.Demand, Name=”IService.Remove”, Role=”AdminGroup”)]



Leave a Reply 0

Your email address will not be published. Required fields are marked *