|Machine level configuration||Application/folder level configuration|
|Can have more than one Web.config||Only one Machine.config|
|Web.config overrides the machine.config file||Same|
|Automatically installed when installing Visual Studio.||Created when creating an ASP.Net web application|
Authentication is a process of identifying a user based on their credentials (means user id and password). There are 5 types of authentication and are as below.
- Password based authentication
- Device based authentication
- Biometric Authentication
- Retina Scanners
- Hand Scanners
Authorization is a process of determining whether an authenticated user is allowed to access a specific resource or not.
- It is the process of executing code in the context of another user identity.
- It is the mechanism in the ASP.NET which decide under which account web application should be run.
- By default Impersonation is off, we need to enable it in Web.config file.
- By default all the ASP.NET applications run under the ASP.NET user account. If you set the impersonation to TRUE in the Web.config file then that application runs under the current user’s account who has logged in that machine. <identity impersonate=”true” />
- We can use the impersonation in this two scenarios:
- To give each web application different permissions.
- To use existing Windows user permission.
- These two scenario are fundamentally different. In the first one, impersonation defines a single, specific account. In this case, no matter what user access the application, and no matter what type of user-level security you use, the code will run under the account you’ve set. In the second one, the user must be authenticated by IIS. The web-page code will then execute under the identity of the appropriate user.
It is the mechanism, by which the page will be posted Back to the server automatically based on some events in the web controls.
Example – Dropdown Box web control has the property autopostback, if we set the property to true, when ever user selects a different value in the combo box, and event will be fired in the server. i.e. a request will be send to the server.
Autopostback – Property of the control
IsPostback – Property of the Page class
IsPostback is a property which returns Boolean value. It checks weather the page is posted back or not.
Tracing is a way to monitor the execution of your ASP.NET application. You can record exception details and program flow in a way that doesn’t affect the program’s output.
Page level Tracing – Enabled on a page-by-page basis by adding “Trace=true” to the Page directive
Application Tracing – You can enable tracing for the entire application by adding tracing settings in web.config. In below example, pageOutput=”false” and requestLimit=”20″
It is the process of deleting items from the cache when memory is scarce. Items are removed when they have not been accessed in some time or when items are marked as low priority when they are added to the cache. ASP.NET uses the CacheItemPriority object to determine which items to scavenge first. CacheItemPriority.High assigns a priority level to an item so that the item is least likely to be deleted from the cache.
- It is a class that listens for trace and debug messages from .NET applications.
- Display messages to users by writing messages to files.
- It can modify messages before displaying them, or even we can filter out the messages
- It is common practice to simply log the message with possibly some formatting for easy readability.
- It is derived from the System.Diagnostics.TraceListener base class.
- The .NET Framework ships with three trace listeners:
- EventLogTraceListener – logging messages to event logs.
- DefaultTraceListener – logging messages to standard debug output such as debuggers.
- TextWriterTraceListener – logging messages to text files.
|Formatted output will be displayed.||unformatted output will be displayed.|
|It gives String.Format-style formatted output.||It never gives like that.|
|It writes the HTTP Output Stream.||It writes the text stream|
|As per specified options it formats the string and then write to web page.||It just output a string to web page.|
- It is the property that enables the individual controls to maintain focus between PostBack
- The features of SmartNavigation property are namely:
- Maintaining element focus between post backs
- Eliminate page flash caused by page post back
- Prevents each post back from being saved in the browser history
- The scroll position of a Web page is maintained after PostBack.
- Only the most recent Web page state is retained in the Web browser history folder.
Disclaimer – F5debug Interview Questions & Answers Series:
You may recopy extracts from these pages (“the material”) to individual third party websites or to any intranet websites, but only if:
You acknowledge www.f5debug.net as the source of the material. Such acknowledgment should include reference to www.f5debug.net in the copy of the material and should also include “© Karthikeyan Anbarasan, www.f5debug.net “. You inform the third party that these conditions apply to him/her and that he/she must comply with them.