Question: What is App Domain in Asp.Net?
|
Answer: As the operating system uses a Process as a container for code and data,
similarly .NET runtime uses an AppDomain as a container for code and data.
App Domain can be considered a lightweight process that is both a container and a boundary.
The CLR can allow multiple .Net applications to run within a single AppDomain.
Similarly, multiple Appdomains may exist in a single Process.
AppDomains are created using CreateDomain method.
|
Question: What is Query String in an Asp.Net app?
|
Answer: Query-string is a technique to send data from one web page to another through URL.
A Query-string consists of two parts as key-value pairs, and each pair is separated by ampersand (&).
And the ?(question mark) indicates the beginning of a Query-string.
Query-string lengths are fixed, so Query-strings cannot be used to send long data.
Also Query-strings are visible to the user, so it should not be used to send sensitive information, unless encrypted.
|
Question: What are master pages in Asp.Net?
|
Answer: The master page provides a template for all pages in a website with shared layout and functionality.
It allows one to create consistent look and behavior for all pages in a web application.
A master page defines placeholders for its contents and those can be overridden by content pages.
Finally the output is rendered as a combination of the master page and the content page.
|
Question: Please specify pros and cons of Query-strings?
|
Answer: Below please find the advantages and disadvantages of query strings:
Advantages>>
• Very simple to implement
• Easy to read information from Query-string.
• Supports cross-domain (can send to or read from a different domain).
Disadvantages>>
• Query-strings are human Readable
• There is browser limit on URL length
• The Cross-page functionality can makes it redundant
• It can be easily modified by end user
|
Question: What is Tracing in .NET?
|
Answer: Tracing helps us to see runtime issues in the application.
Tracing is disabled by default as it adds certain overheads but it provides following:
• It enables one to follow page's execution path.
• It displays diagnostic information at run time.
• It helps to debug application issues.
• It can be integrated with system-level tracing to provide multi-level output for distributed and multi-tier applications.
|
Question: How Tracing can be enabled in Asp.Net application?
|
Answer: Below are couple of ways to enable tracing in Asp.Net app:
• Page Level: When the trace output is displayed just for the page, one needs to set it at the page level like: <%@ Page Trace="true" Language="C#">
• Application Level: In Application-Level tracing the information is stored for each request of the application and it can be set in the web.config file as: <trace enabled="true"/>
|