Question 5) TS: Microsoft .NET Framework 2.0

Posted on
Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone

 

Objective: Implementing Authentication and Authorization
SubObjective: Use login controls to control access to a Web application

 

Multiple Answer Multiple Choice

 

You are creating an ASP.NET application. You implement Forms authentication to authenticate the users of your ASP.NET application. To display a link for authenticated users to log out of the ASP.NET application, you decide to use the LoginStatus Web server control.

 

You want to ensure that users are redirected to the Welcome.aspx Web page when they click the LoginStatus Web server control to log out from the ASP.NET application.

 

Which properties of the LoginStatus Web server control should you use? (Choose two. Each answer is a part of the complete solution.)

 

A. LogoutPageUrl
B. LogoutImageUrl
C. LoginImageUrl
D. LogoutAction
E. LoginText

 

Answer:
A. LogoutPageUrl
D. LogoutAction

 

Tutorial:
You should set the LogoutPageUrl property to the location of the Welcome.aspx Web page. The LogoutPageUrl property specifies the Web page to which users are redirected when they click the LoginStatus Web server control to log out from the ASP.NET application. The LoginStatus Web server control displays a link to log out or log in a user, depending upon the status of the user. If a user is an authenticated user, the LoginStatus Web server control displays a link to log out. If a user is an anonymous user, the LoginStatus Web server control displays a link to log in. The LoginStatus Web server control can display either an image or a text as link to log in or log out from the ASP.NET application.

 

You should use the LogoutAction property because this property is used to specify the action that should be taken when the uses click the LoginStatus Web server control to log out from the ASP.NET application. The valid actions are Redirect, RedirectToLoginPage, and Refresh. The value Redirect ensures that the Web page specified in the LogoutPageUrl property is displayed when the user logs out by using the LoginStatus Web server control. The value RedirectToLoginPage ensures that the login Web page of the ASP.NET application is displayed to the user when the user logs out by using the LoginStatus Web server control. The value Refresh ensures that the current Web page is refreshed when the user clicks the LoginStatus Web server control. In this scenario, you are required to redirect users to the Welcome.aspx Web page when they click the LoginStatus Web server control to log out from the ASP.NET application. Therefore, you should set the LogoutAction property to the value Redirect.

 

You should not use the LogoutImageUrl property because this property is used to specify the location of the image to be displayed when the LoginStatus Web server control displays a link to log out from the ASP.NET application. In this scenario, you are required to redirect users to the Welcome.aspx Web page when they click the LoginStatus Web server control to log out from the ASP.NET application.

 

You should not use the LoginImageUrl property because this property is used to specify the location of the image to be displayed when the LoginStatus Web server control displays a link to log in. In this scenario, you are required to redirect users to the Welcome.aspx Web pagewhen they click the LoginStatus Web server control to log out.

 

You should not use the LoginText property because this property is used to specify the text to be displayed on the LoginStatus Web server control. In this scenario, you are required to redirect users to the Welcome.aspx Web page when they click the LoginStatus Web server control to log out.

 

Reference:
MSDN2 Library, Search, “.NET Development,” “.NET Framework SDK,” “Class Library Reference,” “System.Web.UI.WebControls,” “LoginStatus Class.”

 

MSDN2 Library, Search, “Development Tools and Languages,” “Visual Studio,” “Visual Web Developer,” “Web Server Controls,” “Individual Web and HTML Controls,” “Login Controls,” “Getting Started,” “ASP.NET Login Controls Overview.”

 

These questions are derived from the Self Test Software Practice Test for Microsoft exam #70-528 – TS: Microsoft .NET Framework 2.0 – Web-Based Client Development (VB.NET)

Like what you see? Share it.Share on Google+Share on LinkedInShare on FacebookShare on RedditTweet about this on TwitterEmail this to someone
cmadmin

ABOUT THE AUTHOR

Posted in Archive|

Comment: