PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are creating a .NET Remoting object named Dealer for an automobile dealership. Dealer exposes a method named SaveSales that saves sales information for the dealership.

Dealer is configured to use Integrated Windows authentication to authenticate its callers. You must ensure that all users of SaveSales are members of the Manager group before allowing the code within SaveSales to run.

Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
[PrincipalPermission(SecurityAction.Demand,
Role=”Manager”)]
public DataSet SaveSales(DataSet sales) {
// Code to save sales data goes here.
}

B.
[PrincipalPermission(SecurityAction.LinkDemand,
Role=”Manager”)]
public DataSet SaveSales(DataSet sales) {
// Code to save sales data goes here.
}

C.
[PrincipalPermission(SecurityAction.InheritanceDemand,
Role=”Manager”)]
public DataSet SaveSales(DataSet sales) {
// Code to save sales data goes here.
}

D.
public DataSet SaveSales(DataSet sales) {
string role = “Manager”;
PrincipalPermission perm = new
PrincipalPermission(null, role);
// Code to save sales data goes here.
}


Leave a Reply