ASP.NET Security - ASP.NET (MCQ) questions and answers

Here, you can read ASP.NET Security multiple choice questions and answers with explanation.

1)   What is the last event of web page life cycle?
- Published on 19 Oct 15

a. Page_Load
b. Page_LoadComplete
c. Page_Finish
d. Page_Unload
Answer  Explanation 

ANSWER: Page_Unload

Explanation:
When an ASP.NET page runs, the page goes through a series of events. These step by step events are called as page life cycle. The first event is Page_PreInit and last event is Page_Unload.
The following are the list of page life cycle event.

• PreInit
• Init
• InitComplete
• PreLoad
• Load
• LoadComplete
• PreRender
• PreRenderComplete
• SaveStateComplete
• Render
• Unload


2)   If you are using user control in ASP.NET page which directory will be used?
- Published on 19 Oct 15

a. Register
b. Assembly
c. Implements
d. Aspx
Answer  Explanation 

ANSWER: Register

Explanation:
@register directive will be used, when you drag a user control onto your page. This directive registers your user control on the page so that the control can be accessed by the page. @Register directive informs the compiler that a user control added to the page. In ASP.NET the extension of user control is .ascx.


3)   Range Validator control in ASP.NET supports which type?
- Published on 19 Oct 15

a. Integer
b. String
c. Currency
d. All of the above
Answer  Explanation 

ANSWER: All of the above

Explanation:
The RangeValidator control checks whether a user's input data is between a specified upper and lower value. This controls supports the following type.
• String
• Integer
• Double
• Date
• Currency


4)   Which of the following are required to enable users to change the title of web part?
- Published on 19 Oct 15

a. CatalogZone
b. TitleZone
c. EditorZone, AppearanceEditorPart
d. WebPart
Answer  Explanation 

ANSWER: EditorZone, AppearanceEditorPart

Explanation:
EditorZone enables the user to edit appearance, layout, behavior, and other properties of the visible WebPart controls. So you can change the title of web part by using these controls.


5)   What is Caspol?
- Published on 31 Aug 15

a. Command line tool
b. Code access security policy tool
c. Case Tool
d. Command line tool & Code access security policy tool
Answer  Explanation 

ANSWER: Command line tool & Code access security policy tool

Explanation:
Caspol is command line code access security policy tool. By using this tool administrator can modify security policy for the following level.

Machine policy level.
User policy level.
Enterprise policy level.


6)   What are the element of code access security?
- Published on 31 Aug 15

a. Evidence,Permission
b. SQLSecurity
c. UserInterface
d. SQL Injection
Answer  Explanation 

ANSWER: Evidence,Permission

Explanation:
Code access security consists of the following elements:

• permissions
• permission sets
• code groups
• evidence
• policy


7)   What is the recommended method for securing sensitive connection string information?
- Published on 31 Aug 15

a. Encrypting the data in the application configuration file
b. Using a code obfuscator
c. Using Integrated Security (Windows Authentication)
d. Querying the user for his or her credentials at run time
Answer  Explanation 

ANSWER: Using Integrated Security (Windows Authentication)

Explanation:
No explanation is available for this question!


8)   If you must use a user name and password to connect to a database, where should you store the sensitive information?
- Published on 31 Aug 15

a. Compiled in the application
b. In an encrypted application configuration file
c. In a resource file deployed with the application
d. In the registry
Answer  Explanation 

ANSWER: In an encrypted application configuration file

Explanation:
If your connection string contains sensitive information then encrypted application configuration file by using RsaProtectedConfigurationProvider:


9)   Windows-Based Authentication is well suited for ___________ .
- Published on 28 Jul 15

a. Intranet environment
b. Public web site
c. Desktop application
d. None of the above
Answer  Explanation 

ANSWER: Intranet environment

Explanation:
No explanation is available for this question!


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

<properties>
<group name="Address">
<add name="Street" />
<add name="City" />
</group>
</properties>

- Published on 28 Jul 15

a. - Profile.name.Street
 - Profile.name.City
b. - Profile.Address.Street
 - Profile.Address.City
c. - Address.Street
 - Address.City
d. None of the above.
Answer  Explanation 

ANSWER: - Profile.Address.Street
 - Profile.Address.City

Explanation:
No explanation is available for this question!


1 2 3