Skip to main content

Top 100 Dot Net Interview Questions - Part 5

41. What are the events that happen when a client requests an ASP.NET page from IIS server?

The following events happen when a client requests an ASP.NET page from the IIS server:

  1. User requests for an application resource.
  2. The integrated request-processing pipeline receives the first user request.
  3. Response objects are created for each user request.
  4. An object of the HttpApplication class is created and allocated to the Request object.
  5. The HttpApplication class processes the user request.

42. Explain file-based dependency and key-based dependency.

In file-based dependency, you have to depend on a file that is saved in a disk. In key-based dependency, you have to depend on another cached item.

43. How can you implement the postback property of an ASP.NET control?

You need to set the AutoPostBack property to True to implement the PostBack property of controls.

44. Explain how Cookies work. Give an example of Cookie abuse.

The server tells the browser to put some files in a cookie, and the client then sends all the cookies for the domain in each request. An example of cookie abuse is large cookies affecting the network traffic.

45. Explain login controls.

Login controls are built-in controls in ASP.Net for providing a login solution to ASP.NET application. The login controls use the membership system to authenticate a user credentials for a Web site.

There are many controls in login controls.

  • ChangePassword control - Allows users to change their password.
  • CreateUserWizard control - Provides an interface to the user to register for that Web site.
  • Login control - Provides an interface for user authentication. It consists of a set of controls, such asTextBox, Label, Button, CheckBox, HyperLink.
  • LoginView control - Displays appropriate information to different users according to the user's status.
  • LoginStatus control - Shows a login link to users, who are not authenticated and logout link, who are authenticated
  • LoginName control - Displays a user name, if the user logs in.
  • PasswordRecovery control - Allows users to get back the password through an e-mail, if they forget.

46. What is the use of PlaceHolder control? Can we see it at runtime?

The PlaceHolder control acts as a container for those controls that are dynamically generated at runtime. We cannot see it at runtime because it does not produce any visible output. It used only as a container.

47. What setting must be added in the configuration file to deny a particular user from accessing the secured resources?

To deny a particular user form accessing the secured resources, the web.config file must contain the following code:

<authorization >
<deny users="username" />
</authorization>

48. What are the event handlers that can be included in the Global.asax file?

The Global.asax file contains some of the following important event handlers:

  • Application_Error
  • Application_Start
  • Application_End
  • Session_Start
  • Session_End

49. What is the difference between page-level caching and fragment caching?

In the page-level caching, an entire Web page is cached; whereas, in the fragment caching, a part of the Web page, such as a user control added to the Web page, is cached.

50. Make a list of all templates of the Repeater control.

The Repeater control contains the following templates:

  • ItemTemplate
  • AlternatingltemTemplate
  • SeparatorTemplate
  • HeaderTemplate
  • FooterTemplate

 

Comments

Popular posts from this blog

Introducing Viroprotek

Introducing Viroprotek Advanced Hand Sanitizer & Disinfectant from Asian Paints @ Cheaper Price, contact me at 9884040933

Apple 'iWatch' is Jony Ive's pet project, could release this year

Wearable computing is being seen as one of the next-big-things in the future of technology, whether it's Google's Glass or companies like Samsung and Apple racing to pitch their next smart watch. Independent watch-maker  Pebble  may have taken the lead, but Apple isn't too far behind. A new Bloomberg report  says that Apple's so-called iWatch is expected to release this year. The report mentions that the project is currently being fuelled by the efforts of a 100 engineers being led by Apple design chief Jony Ive himself. While the bit about 100 engineers seems excessive for a company that is known for small teams that work on the secret projects, the report does mention that Ive, who has a fetish for high-end watches, went so far as to order "boxes" of Nike sports watches for his team to study a few years ago. The business portal points out that the iWatch may end up being more profitable than Apple's other rumoured new television business. Even though ...