What should you do to perform custom validation of the user name and password ?

You are creating an application by using Microsoft .NET Framework 3.5. You use Windows Communication Foundation (WCF) to create the application. The YourUserNamePasswordValidator class is implemented in the host application of the WCF service. The host application is named YourServiceHost.exe. You write the following code segment.

namespace YourSecureService
{
class YourUserNamePasswordValidator : UserNamePasswordValidator {
public override void Validate(string userName, string password)
{

}}
}

You need to perform custom validation of the user name and password by using the YourUserNamePasswordValidator class. What should you do?

You are creating an application by using Microsoft .NET Framework 3.5. You use Windows Communication Foundation (WCF) to create the application. The YourUserNamePasswordValidator class is implemented in the host application of the WCF service. The host application is named YourServiceHost.exe. You write the following code segment.

namespace YourSecureService
{
class YourUserNamePasswordValidator : UserNamePasswordValidator {
public override void Validate(string userName, string password)
{

}}
}

You need to perform custom validation of the user name and password by using the YourUserNamePasswordValidator class. What should you do?

A.
Set the wsHttpBinding binding in the following manner. <security mode=”Message”> <message clientCredentialType=”UserName” /></security> Set the service behavior by using thefollowing credentials. <userNameAuthentication
customUserNamePasswordValidatorType=”YourSecureService.YourUserNamePasswordValid ator” userNamePasswordValidationMode=”Custom”/>

B.
Set the wsHttpBinding binding in the following manner. <security mode=”Message”> <message clientCredentialType=”UserName” /></security> Set the service behavior by using the following credentials. <userNameAuthentication customUserNamePasswordValidatorType=”YourSecureService.YourUserNamePasswordValid a or,YourServiceHost” userNamePasswordValidationMode=”Custom”/>

C.
Set the wsHttpBinding binding in the following manner. <security mode=”Message”> <transport clientCredentialType=”UserName” /></security> Set the service behavior by using the following credentials. <userNameAuthentication customUserNamePasswordValidatorType=”YourUserNamePasswordValidator,YourServiceHo st” userNamePasswordValidationMode=”Custom”/>

D.
Set the netTcpBinding binding in the following manner. <security mode=”Transport”> <transport clientCredentialType=”UserName” /></security> Set the service behavior by using the following credentials. <userNameAuthentication customUserNamePasswordValidatorType=”YourSecureService.YourUserNamePasswordValid ator ” userNamePasswordValidationMode=”Custom”/>



Leave a Reply 0

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