The Principal object represents authenticated users. It contains information about user’s identity and role. You have Principal Permission object in .NET Framework that specifies user and its role. It has Demand method that checks the current user or Principal against the name and role specified in the Principal Permission. |
Security checks can be applied in two ways that is imperatively or declaratively.
Declarative security is applied by associating attribute declarations that specify a security action with classes or methods.
Imperative security is applied by calling the appropriate methods of a Permission object that represents the Principal (for role based security) or system resource (for code access security). |
The menu that you get when you right-click is called the context menu. It is a modular piece of markup code that can move around the page. It consists of two distinct blocks, one is the user interface and another is the script code to connect the UI to it. |
• The Array class is not part of the System.Collections namespace. But an array is a collection, as it is based on the list interface.
• Array has a fixed capacity but the classes in the System.Collections namespace don’t have fixed capacity. That’s why array is a static container, but collection is dynamic container.
• Collections objects have a key associated with them. You can directly access an item in the collection by the key. But to find a specific item in an array, unless you don’t know the index number you need to traverse the array to find the value. |
Break mode lets you to observe code line to line in order to locate error.
The VS.NET provides following options to step through code.
• Step Into
• Step Over
• Step Out
• Run To Cursor
• Set Next Statement |
Stepping through the code is a way of debugging the code in which one line is executed at a time.
There are three commands for stepping through code:
Step Into: This debugging mode is usually time-consuming. However, if one wants to go through the entire code then this can be used. When you step into at a point and a function call is made somewhere in the code, then step into mode would transfer the control to the first line of the code of the called function.
Step Over: The time consumed by the Step into mode can be avoided in the step over mode. In this, while you are debugging some function and you come across another function call inside it, then that particular function is executed and the control is returned to the calling function.
Step Out: You can Use Step Out when you are inside a function call and want to return to the calling function. Step Out resumes execution of your code until the function returns, and then breaks at the return point in the calling function. |
The windows which are available while debugging are known as debugging windows.
These are: Breakpoints, Output, Watch, Autos, Local, Immediate, Call Stacks, Threads, Modules, Processes, Memory, Disassembly and Registers. |
|
a)System.Globalization, System.Resources
b)System.Web
c)System.Web.UI.WebControls
d)System.Data.SqlClient
e)System.IO |
The .NET framework has introduced a concept called Garbage collector. This mechanism keeps track of the allocated memory references and releases the memory when it is not in reference. Since it is automatic, it relieves the programmers to manage unused allocated memory. This concept of managing memory is known as Automatic Memory Management. |
Below there are different ways to retain variables between requests. That is:
Context.Handler: This object can be used to retrieve public members of the webform from a subsequent web page.
Querystring: Querystring is used to pass information between requests as part of the web address. Since it is visible to use, we can't use it to send any secured data.
Cookies: Cookies stores small amount of information on client side. But we can't reply on cookies since many clients can refuse cookies.
View state: View state stores items added to the pages. These properties are as hidden fields on the page.
Session state: Session state stores items that are local to the current session.
Application state: Application state stores items that are available to all users of the application. |
Below are the steps to dynamically clone a menu in .NET:
• Create an alternate MainMenu object.
• Clone the first menu with the CloneMenu method.
• Create additional menu items related to the application state.
• Then add the new menu items to the MenuItems collection of the top-level menu item cloned. This can be done by using the Add method to specify their order within the collection by their index.
• Then assign the newly created MainMenu object to the form. |
Merge module projects are used for the packaging of files or components that are shared between multiple applications.
A merge module (.msm) file includes files, resources, registry entries, and setup logic. The .msm file is merged into the deployment projects for consistent installation of a component across multiple applications. |
XCOPY deployment is a simple method of deployment where the DOS command XCOPY is used to copy the application directory and any sub directories to the target machine. You can use XCOPY deployment if your application has no dependency on shared files and requires no special actions to be taken upon deployment. If suppose one application requires more complex deployment or references shared assemblies, there you should not use XCOPY. |
Here is some partial list of the members of the SmtpClient class...
1) Properties:
• Host- The name or IP address of your email server.
• Port- The number of the port to use when sending an email message.
2) Methods:
• Send- It enables you to send an email message synchronously
• SendAsync- It enables you to send an email message asynchronously.
3) Events:
• Send Completed- It is raised when an asynchronous send operation completes. |
Network Load Balancing is a clustering technology offered by Microsoft as part of all Windows Server 2000 and Windows Server 2003 family operating systems. Network Load Balancing uses a distributed algorithm to load balance network traffic across the number of hosts, helping to enhance the scalability and availability of IP-based services, such as Web, Virtual Private Networking, Streaming Media, Terminal Services, Proxy, etc. It also provides high availability by detecting host failures and automatically redistributing traffic to operational hosts. |