Asp.Net Security MCQs

Asp.Net Security MCQs

Answer these Asp.Net Security MCQs and see how sharp is your knowledge of Asp.Net Security.
Scroll down and let's start!

1: The following group profile properties defined under a group name in Web.config file. How will you access Street and City property?

A.   - Profile.Address.Street - Profile.Address.City

B.   None

C.   - Profile.name.Street - Profile.name.City

D.   - Address.Street - Address.City

2: You use the ASP.NET Web Site Administration Tool to configure ASP.NET membership with forms authentication. What should you name your login form so that you do not have to modify the Web.config file?

A.   Auth.aspx

B.   Login.aspx

C.   LoginPage.aspx

D.   Default.aspx

3: Windows-Based Authentication is well suited for.

A.   Public web site

B.   Desktop application

C.   None

D.   Intranet environment

A.   LoginStatus

B.   LoginName

C.   LoginView

D.   Login

5:

Choose the correct option according to given statements.


Statement 1: Authentication is the process that determines the identity of a user.

Statement 2: Authorization is the process of determining whether a user is permitted access to any part of an application, or any particular resource.

Statement 3: Authorization is the process that determines the identity of a user.

Statement 4: Authentication is the process of determining whether a user is permitted access to any part of an application, or any particular resource.


A.   Statement 3 and Statement 4 are correct

B.   Statement 2 and Statement 4 are correct

C.   Statement 1 and Statement 2 are correct

D.   Statement 1 and Statement 3 are correct

6: You are creating an ASP.NET application for company CareerRide. You use form based authentication to validate users. You need to prevent unauthenticated users from accessing the application. What should you do?

A.   In the authorization section of the Web.config file, set the users attribute of the deny element to '?'

B.   Set In the authorization section of the Web.config file, set the users attribute of the deny element to '*'

C.   In the authorization section of the Machine.config file, set the users attribute to the allow element to '?'.

D.   None

7: How many types of authentication ASP.NET supports?

A.   .NET Passport Authentication

B.   All

C.   Windows authentication

D.   Forms authentication

8:

You are creating an ASP.NET application for Google. The company uses Microsoft Windows authentication. All users are in the Google domain.

You want to configure the application to use the following authorization rules:

1. Anonymous users must not be allowed to access the application.

2. All employees except Raj and Shiva must be allowed to access the application.


Which code you will apply to configure the application?

A.  

 <authorization>

<deny users=' Google \Raj, Google \Shiva'>

<deny users='?'>

<allow users='*'>

</authorization>

B.  

<authorization>

<deny users=' Google \Raj, Google \Shiva'>

<allow users='*'>

<deny users='?'>

</authorization>

C.  

 <authorization>

<allow users='*'>

<deny users=' Google \Raj, Google \Shiva'>

<deny users='?'>

</authorization>

D.  

 <authorization>

<allow users=' Google \Raj, Google \Shiva'>

<allow users='*'>

</authorization>

9:

If any user has disabled cookies in their browsers, what can you do to enable them to use forms authentication?

 Set cookieless=true;

 Use the AutoDetect setting of the cookieless attribute

 None

 Set BoweserCookieEnabled=true;

Which of the following Web.config files correctly enables the Web application to track the LastVisit of anonymous users in a variable of type DateTime?

A.  

 <anonymousIdentification enabled='true' />

<profile>

<properties>

<add name='LastVisit' type='System.DateTime' allowAnonymous='true' />

</properties>

</profile>


B.  

 <anonymousIdentification enabled='true' />

<profile>

<properties>

<add name=' LastVisit ' allowAnonymous='true' />

</properties>

</profile>

C.  

<profile>

<properties>

<add name='LastVisit' type='System. DateTime ' />

</properties>

</profile>


D.  

 <anonymousIdentification enabled='true' />

<profile>

<properties>

<add name=' LastVisit ' type='System. DateTime ' />

</properties>

</profile>