PrepAway - Latest Free Exam Questions & Answers

What should you do to meet the following criteria can access the RemoveOrder method?

You are creating a Windows Communication Foundation (WCF) service by using Microsoft .NET Framework 3.5.
The WCF service will validate certificates to authorize client applications.
You write the following code segment.

class Store: IStore
{
public void RemoveOrder(int ordered){ }
}

You need to ensure that only those client applications that meet the following
criteria can access the RemoveOrder method:
“AdminUser” is the subject in the client certificate.
“1bf47e90fD0acf4c0009cda65eDaadcf1cedd592″ is the thumbprint in the client certificate.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Decorate the RemoveOrder method by using the following attribute.
[PrincipaIPermission(SecurityAction.Demand, Name=”AdminUser;
1bf47e90fD0acf4c0009cda65eDaadcf1cedd592″)]
Initialize the serviceAuthorization element of the service behavior in the following manner.
<serviceAuthorization principaIPermissionMode=”Windows”/>

B.
Decorate the RemoveOrder method by using the following attribute.
[PrincipaIPermission(SecurityAction.Demand, Role=”CN=AdminUser,
1bf47e90fD0acf4c0009cda65eDaadcf1cedd592″)]
Initialize the serviceAuthorization element of the service behavior in the following manner.
<serviceAuthorization principaIPermissionMode=”Windows”/>

C.
Decorate the RemoveOrder method by using the following attribute.
[PrincipaIPermission(SecurityAction.Demand, Role=”AdminUser,
1bf47e90fD0acf4c0009cda65eDaadcf1cedd592”)]
Initialize the serviceAuthorization element of the service behavior in the following manner.
<serviceAuthorization principaIPermissionMode=”UseAspNetRoles”/>

D.
Decorate the RemoveOrder method by using the following attribute.
[PrincipaIPermission(SecurityAction.Demand, Name = “CN=AdminUser;
1bf47e90fD0acf4c0009cda65eDaadcf1cedd592”)]
Initialize the serviceAuthorization element of the service behavior in the following manner.
<serviceAuthorization principaIPermissionMode=”UseAspNetRoles”/>


Leave a Reply