Sam is developing an application that enables the users to perform read and write operations on text files. He uses structured exception handling to handle the errors. He writes the code for closing all the files that were opened in the Finally block. Which of the following is true regarding the Finally block?
Finally block will be executed only if an error occurs
Finally block is executed after Catch block when no error occurs
Finally block is executed after Try block regardless of whether an error occurs
Finally block is executed only when no error occurs
None of above
Useful resources, Handling COM Interop Exceptions
By enabling page tracing
By enabling application tracing
By enabling server tracing
By looking up the system.log file
The Trace.Write() statements do not appear within the resulting output. To view the results of the Trace.Write() statements, we need to enable tracing for the page or for the application. Useful resources, tracing
1. For configuration, ASP.NET uses IIS Metabase
2. For configuration, ASP.NET uses an XML based configuration system
Both 1 and 2
Neither 1 nor 2
Useful resources, ASP.NET Configuration Overview
The user RIL is first denied and then allowed access
The user RIL is denied access because the <deny> element takes precedence over the <allow> element
An error is generated because deny and allow cannot both be assigned to the same user
Can't say. It depends on the Windows OS version
At run time, the authorization module iterates through the allow and deny elements, starting at the most local configuration file, until the authorization module finds the first access rule that fits a particular user account. Then, the authorization module grants or denies access to a URL resource depending on whether the first access rule found is an allow or a deny rule. Useful resources, deny allow Element for authorization
You are creating an ASP.NET application. The application will be deployed on intranet. Application uses Microsoft Windows authentication. More than 100 users will use the ASP.NET application simultaneously. What setting should be done by the project manager regarding user authentication?
Add the following element to the authentication section of the Web.config file: <allow users="?"/>
Use the Configuration Manager for your project to designate the user's security context.
Write code in the Application_AuthenticateRequest event handler to configure the application to run in the user's security context.
Add the following element to the system.web section of the Web.config file: <identity impersonate="true"/>
Useful resources, deny allow Element for authorization
Both a and b
To signal the occurrence of unusual or unanticipated program events
To redirect the program's normal flow of control
In cases of potential logic or user input errors
In case of overflow of an array boundary