Tuesday, July 22, 2014

ASP.Net Interview Questions Volume II

                                             ASP.Net Interview Questions Volume II
ASP.NET interview questions

Difference between Namespace and Assembly

-Namespace can span multiple assemblies.
-Namespace logically groups class.
-Assembly is physical grouping of logical units.


Can you explain how to sign out in forms authentication?

FormsAuthentication.SignOut()

What are namespaces provided by .NET for data management?

System.data
System.data.oledb
System.data.sqlclient
System.xml


What are the fundamental objects in ADO.NET?

Datareader
Dataset

What is the basic method of dataadapter?

fill, fillschema, update


Explain the importance of Manifest in .NET

- .NET Manifest stores assembly metadata.
-Metadata is responsible in doing versioning of assembly, secure identify, resolve references to resources and classes


Ramesh 12-6-2011 12:35 AM
ASP.NET interview questions

Can you explain the importance of Web.config?

It applies settings to each web application.


Explain the difference between dataset and datareader.

-Datareader provides forward-only and read-only access to data
-Dataset object can hold more than one table from the same data sources as well as the relationships between them.
-Dataset is a disconnected architecture
-Dataset cab persist contents while datareader cannot persist contents


What are the ways of authentication technique in ASP.NET?

Windows authentication
Passport authentication
Forms authentication


How to format data inside DataGrid.

By using DataFormatString property


Tell me which method to customize columns in DataGrid.

Template column


How do we force validation control to run?

Page.Validate


Can we disable client side script in validation?

Yes, set EnableClient script to false


How to find how to code was executed.

Tracing


How to find how the code was executed.

Session.abandan


What are different IIS isolation levels?

LOW (IIS process)
Medium (Pooled)
High (Isolated)


Tanvir 12-6-2011 12:35 AM
ASP.NET interview questions

What are the modes of storing ASP.NET session?

-InProc
-StateServer
-SQLServer


What are the ways to maintain state?

Hidden fields, viewstate, hidden frames, cookies, query string


Tell me the sequence in which ASP.NET events are processed.

-Page_Init
-Page_Load
-Control events
-Page_Unload event


How to assign page specific attributes.

By using @Page directive


Where is ViewState information stored?

HTML hidden fields


Name the validation controls in ASP.NET.

RequiredFieldValidator
RangeValidator
CompareValidator
RegularExpressionValidator
CustomValidator
ValidationSummary


Ranveer 12-6-2011 12:34 AM
ASP.NET interview questions

What are different types of JIT?

-Pre-JIT, Econo-JIT, Normal-JIT


How can we perform transactions in .NET?

-Open a database connection using open method of the connection object.
-Begin a transaction using the Begin Transaction method of the connection object.
-Execute the SQL commands using the command object.
-Commit or roll back the transaction using the commit or rollback method of the transaction object.
-Close the database connection.


What is reflection?

-Reflection is used to browse through the metadata information.
-Using reflection you can dynamically invoke methods using system.Type.Invokemember


Which class does the remote object has to inherit?

System.MarchalByRefObject


What are the different kinds of marshalling?

Marshal-by-value
Marshal-by-reference


What are different types of caching?

-Page Output caching
-Page Fragment Caching


Akash 12-6-2011 12:34 AM
ASP.NET interview questions

What is a Assembly?

Assembly is a unit of deployment like an exe or a dll.


Explain the concept of strong names.

-Strong Name is same as GUID in COM components
-Strong Names helps GAC to differentiate between two versions
-It is required when we deploy assembly in GAC.
-Strong Names use public and private key concept


Difference between Namespaces and assembly.

Assembly is physical grouping of logical unit whereas Namespace is logically groups classes.

What are the different types of Assembly?

- Private assembly
- Public assembly


Where is version information stored of an assembly?

Stored in assembly in manifest.


Kedar 12-6-2011 12:34 AM
ASP.NET interview questions and answers

Explain Global assembly cache, GAC.

Global assembly cache contains shared assemblies that are globally accessible to all .net application on the machine.
Shared assembly is installed in the GAC.



NIsha 11-22-2011 02:51 AM
ASP.NET interview questions and answers

Difference between an EXE and a DLL.

An EXE is portable and executable with a entry point
A dll is not portable and executable since it has no entry point.



Disha 11-22-2011 02:51 AM
ASP.NET interview questions and answers

Machine config and web config. Can you explain them?

Machine config sets the base configuration for all the .net assemblies running on the server.
Web config sets the base config for all the web app and override settings in machine configuration.



Prithvi 11-22-2011 02:50 AM
ASP.NET interview questions and answers

Value types differ from reference types. Explain

variables of the value types directly contain their data.
Variables of the reference types store references to objects.
With reference types, it is possible for two variables to reference the same object,
With value types, the variables have their own copy of the data.


Pratik 11-22-2011 02:50 AM
ASP.NET interview questions and answers

Is string a value type or a reference type?

String is a reference type.

Deepak 11-22-2011 02:49 AM
ASP.NET interview questions

Benefits and Limitation of using Viewstate for state management.

Benefits of using Viewstate

With Viewstate states are retained automatically
It is simple to use and implement
No server resources are required because state is in a structure in the page code
From security point of view, it is safer than hidden fields as values in view state are hashed, compressed, and encoded
Since the data is cached on the client View, state is good for caching data in Web frame configurations.

Limitation of Viewstate

Performance are affected when large values are stored because view state is stored in the page.
Despite the state stores data in a hashed format, it can still be tampered because it is stored in a hidden field on the page.


Nidhi 11-12-2011 09:03 AM
ASP.NET interview questions

What is Cache Callback in Cache?
Cache object is dependent on its dependencies example file based, time based etc...Cache items
remove the object when cache dependencies change.ASP.NET provides capability to execute a
callback method when that item is removed from cache.

What is scavenging?

It is process of deleting items from the cache when memory is scarce.
Items are removed from cache depending on cache item priority.
Cache item priority is set when you add item to cache.
The items scavenging are removed according to priority.

Explain different types of remote object creation mode in .NET.

Different ways in which object can be created using Remoting are
SAO (Server Activated Objects) also called as Well-Known call mode.
CAO (Client Activated Objects)

SAO has two modes “Single Call” and “Singleton”

With Single Call object, the object is stateless as object is created with every method call.
The object is created once and the object is shared with all clients with Singleton.

CAO are stateful as compared to SAO.
The creation request is sent from client side.
Client holds a proxy to the server object created on server.


Nidhi 11-12-2011 09:03 AM
ASP.NET interview questions

How do we access viewstate value of this page in the next page ?

View state contains information about controls embedded on the particular page.
ASP.NET 2.0 resolves this by embedding a hidden input field name, __POSTBACK.
This field is embedded only when there is an IButtonControl on the page and its PostBackUrl property is set to a non-null value.
This field contains the view state information of the poster page.


Explain how to implement Page Fragment Caching.

Page fragment caching involves the caching of a fragment of the page, rather than the entire page.
When portions of the page are need to be dynamically created for each user request this is best
method as compared to page caching. You can wrap Web Forms user control and cache the
control so that these portions of the page do not need to be recreated each time.

Explain the different types of caching using cache object of ASP.NET.
Two types of output caching to cache information:
Page Output Caching
Page Fragment Caching

Page Output Caching
Page output caching adds the response of page to cache object.
Later when page is requested page is displayed from cache rather than creating the page object and displaying it.
Page output caching is good if the site is fairly static.

Page Fragment Caching
If parts of the page are changing, you can wrap the static sections as user
controls and cache the user controls using page fragment caching.


Nidhi 11-12-2011 09:02 AM
ASP.NET interview questions

Explain about Query String and its benefits and limitations.

It is information sent to the server appended to the end of a page URL.

Benefits of query string:

No server resources are required.
The query string containing in the HTTP requests for a specific URL.
All browsers support query strings.

Following are limitations of query string

Query string data is directly visible to user thus leading to security problems.-
Most browsers and client devices impose a 255-character limit on URL length.

What is .NET Remoting?

.NET remoting is replacement of DCOM.
You can make remote object calls, which are in different Application Domains.
The client uses a proxy to make remote object calls, which looks like a real object.
Client Channel communicates with Server Channel.
Server Channel uses as formatter to deserialize the message and sends to the remote object.
ASP.NET interview questions

What is Absolute and Sliding expiration?

You specify the duration of the cache using Absolute Expiration, starting from the time the cache is activated.


Can you explain benefits and limitations of using Hidden frames?

Benefits of hidden frames:

Using hidden frames you can cache more than one data field.
The ability to cache and access data items stored in different hidden forms.

Limitations of hidden frames

They are not supported on all browsers.
The data can be tampered.


Nidhi 11-12-2011 09:02 AM
ASP.NET interview questions

Explain the advantages and disadvantages of using Cookies.

Advantages of cookies

Since stored in client no server resources are required.
cookies are light weight and simple to use

Disadvantages of using cookies

Most browsers place a limit on the size of a cookie.
Use of cookies are inaffective when browser or client device’s ability to receive cookies are disabled.
Cookies can be tampered.
Cookies can expire thus leading to inconsistency.


Nidhi 11-12-2011 09:01 AM
ASP.NET interview questions

Benefits and Limitation of using Hidden fields.


Benefits of Hidden fields

Hidden fields are simple and easy to implement.
Hidden fields work with Web Farms as data is cached on client side
Good news is that all browsers support hidden field.
And yet another advantage is that no server resources are required for Hidden fields usage

Limitations of Hidden field

One of the biggest threat of using Hidden fields are that they can be tampered creating a security hole.
Page performance adversely affected if you store large data since the data are stored in pages itself.
They do not support rich structures as HTML hidden fields are only single
valued.

1. What does the Orientation property do in a Menu control?
Orientation property of the Menu control sets the display of menu on a Web page to vertical or horizontal.
Originally the orientation is set to vertical.
2. Differentiate between:
a.)Client-side and server-side validations in Web pages.
- Client-side validations happends at the client's side with the help of JavaScript and VBScript. This happens before the Web page is sent to the server.
- Server-side validations occurs place at the server side.
b.)Authentication and authorization.
- Authentication is the process of verifyng the identity of a user using some credentials like username and password while authorization determines the parts of the system to which a particular identity has access.
- Authentication is required before authorization.

For e.g. If an employee authenticates himself with his credentials on a system, authorization will determine if he has the control over just publishing the content or also editing it.
3.a.) What does the .WebPart file do?
It explains the settings of a Web Parts control that can be included to a specified zone on a Web page.
b.) How would you enable impersonation in the web.config file?
In order to enable the impersonation in the web.confing file, take the following steps:
- Include the <identity> element in the web.config file.
- Set the impersonate attribute to true as shown below:
<identity impersonate = "true" />
4. a.) Differentiate between
a.)File-based dependency and key-based dependency.
- In file-based dependency, the dependency is on a file saved in a disk while in key-based dependency, you depend on another cached item.
b.) Globalization and localization.
- Globalization is a technique to identify the part of a Web application that is different for different languages and separate it out from the web application while in localization you try to configure a Web application so that it can be supported for a specific language or locale.
5. a.)Differentiate between a page theme and a global theme?
- Page theme applies to a particular web pages of the project. It is stored inside a subfolder of the App_Themes folder.
- Global theme applies to all the web applications on the web server. It is stored inside the Themes folder on a Web server.
b.)What are Web server controls in ASP.NET?
- These are the objects on ASP.NET pages that run when the Web page is requested.
- Some of these Web server controls, like button and text box, are similar to the HTML controls.
- Some controls exhibit complex behavior like the controls used to connect to data sources and display data.
6. a.) Differentiate between a HyperLink control and a LinkButton control.
- A HyperLink control does not have the Click and Command events while the LinkButton control has them, which can be handled in the code-behind file of the Web page.
b.) How do Cookies work? Give an example of their abuse.
- The server directs the browser to put some files in a cookie. All the cookies are then sent for the domain in each request.
- An example of cookie abuse could be a case where a large cookie is stored affecting the network traffic.
7. a.) What are Custom User Controls in ASP.NET?
- These are the controls defined by developers and work similart to other web server controls.
- They are a mixture of custom behavior and predefined behavior.
b.) What is Role-based security?
- Used in almost all organization, the Role-based security assign certain privileges to each role.
- Each user is assigned a particular role from the list.
- Privileges as per role restrict the user's actions on the system and ensure that a user is able to do only what he is permitted to do on the system.
8. What are the HTML server controls in ASP.NET?
- HTML server controls are similar to the standard HTML elements like those used in HTML pages.
- They expose properties and events for programatical use.
- To make these controls programmatically accessible, we specify that the HTML controls act as a server control by adding the runat="server" attribute.
9. a.) What are the various types of Cookies in ASP.NET?
There exist two types of cookies in ASP.NET

- Session Cookie - It resides on the machine of the client for a single session and works until the user logs out of the session.
- Persistent Cookie - It resides on the machine of a user for a specified period. This period can be set up manually by the user.
b.) How would you turn off cookies on one page of your website?
- This can be done by using the Cookie.Discard property.
- It Gets or sets the discard flag set by the server.
- When set to true, this property instructs the client application not to save the Cookie on the hard disk of the user at the end of the session.
c.) How would you create a permanent cookie?
- Permanent cookies are stored on the hard disk and are available until a specified expiration date is reached.
- To create a cookie that never expires set its Expires property equal to DateTime.maxValue.
10. a.) Explain Culture and UICulture values.
- Culture value determines the functions like Date and Currency used to format data and numbers in a Web page.
- UICulture value determines the resources like strings or images loaded in a Web application for a Web page.
b.) What is Global.asax file used for?
It executes application-level events and sets application-level variables.
11. a.) Explain ASP.NET Web Forms.
- Web Forms are an extremely important part of ASP.NET.
- They are the User Interface (UI) elements which provide the desired look and feel to your web applications.
- Web Forms provide properties, methods, and events for the controls that are placed onto them.
b.) What is event bubbling?
- When child control send events to parent it is termed as event bubbling.
- Server controls like Data grid, Data List, and Repeater can have other child controls inside them.
12. What are the various types of validation controls provided by ASP.NET?
ASP.NET provides 6 types of validation controls as listed below:

i.) RequiredFieldValidator - It is used when you do not want the container to be empty. It checks if the control has any value or not.

ii.) RangeValidator - It checks if the value in validated control is within the specified range or not.

iii.) CompareValidator - Checks if the value in controls matches some specific values or not.

iv.) RegularExpressionValidator - Checks if the value matches a specific regular expression or not.

v.) CustomValidator - Used to define User Defined validation.

vi.) Validation Summary -Displays summary of all current validation errors on an ASP.NET page.
13. Differentiate between:
a.) Namespace and Assembly.
- Namespace is a naming convenience for logical design-time while an assembly establishes the name scope for types at run time.
b.) Early binding and late binding.
Early binding means calling a non-virtual method that is decided at a compile time while Late binding refers to calling a virtual method that is decided at a runtime.
14. What are the different kinds of assemblies?
There can be two types of assemblies.

i.) Static assemblies -

- They are stored on disk in portable executable files.
- It includes .NET Framework types like interfaces and classes, resources for the assembly (bitmaps, JPEG files, resource files etc.).

ii.) Dynamic assemblies -

- They are not saved on disk before execution rather they run directly from memory.
- They can be saved to disk after they have been executed.
15. Differentiate between Structure and Class.
- Structures are value type while Classes are reference type.
- Structures can not have constructor or destructors while Classes can have them.
- Structures do not support Inheritance while Classes do support Inheritance.
16. Explain ViewState.
- It is a .Net mechanism to store the posted data among post backs.
- It allows the state of objects to be stored in a hidden field on the page, saved on client side and transported back to server whenever required.
17. What are the various types of Authentication?
There are 3 types of Authentication namely Windows, Forms and Passport Authentication.

- Windows authentication - It uses the security features integrated in Windows NT and Windows XP OS to authenticate and authorize Web application users.

- Forms authentication - It allows you to create your own list of users and validate their identity when they visit the Web site.

- Passport authentication - It uses the Microsoft centralized authentication provider to identify users. Passport allows users to use a single identity across multiple Web applications. Passport SDK needs to be installed to use Passport authentication in your Web application.
18. Explain Server-side scripting and Client-side scripting.
- Server side scripting - All the script are executed by the server and interpreted as needed.
- Client side scripting means that the script will be executed immediately in the browser such as form field validation, email validation, etc. It is usaullay carrried out in VBScript or JavaScript.
19. a.) What is garbage collection?
It is a system where a run-time component takes responsibility for managing the lifetime of objects and the heap memory that they occupy.
b.) Explain serialization and deserialization.
- Serialization is the process of converting an object into a stream of bytes.
- Deserialization is the process of creating an object from a stream of bytes.

Both these processes are usually used to transport objects.
20. What are the various session state management options provided by ASP.NET?
- ASP.NET provides two session state management options - In-Process and Out-of-Process state management.
- In-Process stores the session in memory on the web server.
- Out-of-Process stores data in an external data source. This data source may be a SQL Server or a State Server service. Out-of-Process state management needs all objects stored in session to be serializable.
ASP.NET interview questions - Jan 04, 2011 at 05:16 PM by  Rahul
Describe how Passport authentication works.
ASP.NET application with Passport authentication implemented checks the user’s machine for a current passport authentication cookie. If it is not available, ASP.NET directs the user to a Passport sign-on page. The Passport service authenticates the user, stores an authentication cookie on the user’s computer and direct the user to the requested page.  
Explain the steps to be followed to use Passport authentication.
1. Install the Passport SDK.
2. Set the application’s authentication mode to Passport in Web.config.
3. Set authorization to deny unauthenticated users.
3. Use the PassportAuthentication_OnAuthenticate event to access the user’s Passport profile to identify and authorize the user.
4. Implement a sign-out procedure to remove Passport cookies from the user’s machine.
Explain the advantages of Passport authentication.
User doesn’t have to remember separate user names and passwords for various Web sites
User can maintain his or her profile information in a single location.
Passport authentication also avail access to various Microsoft services, such as Passport Express Purchase.
What is caching?
Caching is the technique of storing frequently used items in memory so that they can be accessed more quickly.
By caching the response, the request is served from the response already stored in memory.
It’s important to choose the items to cache wisely as Caching incurs overhead.
A Web form that is frequently used and does not contain data that frequently changes is good for caching.
A cached web form freezes form’s server-side content and changes to that content do not appear until the cache is refreshed.
Explain the use of duration attribute of @OutputCache page directive.
The @OutputCache directive’s Duration attribute determines how long the page is cached.
If the duration attribute is set to 60 seconds, the Web form is cached for 60 seconds; the server loads the response in memory and retains that response for 60 seconds.
Any requests during that time receive the cached response.
Once the cache duration has expired, the next request generates a new response and cached for another 60 seconds.

1. Explain how a web application works.
Answer:

A web application resides in the server and serves the client's requests over internet. The client access the web page using browser from his machine. When a client makes a request, it receives the result in the form of HTML which are interpreted and displayed by the browser.

A web application on the server side runs under the management of Microsoft Internet Information Services (IIS). IIS passes the request received from client to the application. The application returns the requested result in the form of HTML to IIS, which in turn, sends the result to the client.
2. Explain the advantages of ASP.NET.
Answer:
Following are the advantages of ASP.NET.

Web application exists in compiled form on the server so the execution speed is faster as compared to the interpreted scripts.

ASP.NET makes development simpler and easier to maintain with an event-driven, server-side programming model.

Being part of .Framework, it has access to all the features of .Net Framework.

Content and program logic are separated which reduces the inconveniences of program maintenance.

ASP.NET makes for easy deployment. There is no need to register components because the configuration information is built-in.

To develop program logic, a developer can choose to write their code in more than 25 .Net languages including VB.Net, C#, JScript.Net etc.

Introduction of view state helps in maintaining state of the controls automatically between the postbacks events.

ASP.NET offers built-in security features through windows authentication or other authentication methods.

Integrated with ADO.NET.

Built-in caching features.
3. Explain the different parts that constitute ASP.NET application.
Answer:
Content, program logic and configuration file constitute an ASP.NET application.

Content files
Content files include static text, images and can include elements from database.

Program logic
Program logic files exist as DLL file on the server that responds to the user actions.

Configuration file
Configuration file offers various settings that determine how the application runs on the server.
4. Describe the sequence of action takes place on the server when ASP.NET application starts first time
Answer:
Following are the sequences:

IIS starts ASP.NET worker process - worker process loads assembly in the memory - IIS sends the request to the assembly - the assembly composes a response using program logic - IIS returns the response to the user in the form of HTML.
5. Explain the components of web form in ASP.NET
Answer:
Server controls
The server controls are Hypertext Markup Language (HTML) elements that include a runat=server attribute. They provide automatic state management and server-side events and respond to the user events by executing event handler on the server.

HTML controls
These controls also respond to the user events but the events processing happen on the client machine.

Data controls
Data controls allow to connect to the database, execute command and retrieve data from database.

System components
System components provide access to system-level events that occur on the server.
6. Describe in brief .NET Framework and its components.
Answer:
.NET Framework provides platform for developing windows and web software. ASP.NET is a part of .Net framework and can access all features implemented within it that was formerly available only through windows API. .NET Framework sits in between our application programs and operating system.

The .Net Framework has two main components:

.Net Framework Class Library: It provides common types such as data types and object types that can be shared by all .Net compliant language.

The Common language Runtime: It provides services like type safety, security, code execution, thread management, interoperability services.
7. What is an Assembly? Explain its parts
Answer:
An assembly exists as a .DLL or .EXE that contains MSIL code that is executed by CLR. An assembly contains interface and classes, it can also contain other resources like bitmaps, files etc. It carries version details which are used by the CLR during execution. Two assemblies of the same name but with different versions can run side-by-side enabling applications that depend on a specific version to use assembly of that version. An assembly is the unit on which permissions are granted. It can be private or global. A private assembly is used only by the application to which it belongs, but the global assembly can be used by any application in the system.

The four parts of an assembly are:

Assembly Manifest - It contains name, version, culture, and information about referenced assemblies.

Type metadata - It contains information about types defined in the assembly.

MSIL - MSIL code.

Resources - Files such as BMP or JPG file or any other files required by application.
8. Define Common Type System.
Answer:
.Net allows developers to write program logic in at least 25 languages. The classes written in one language can be used by other languages in .Net. This service of .Net is possible through CTS which ensure the rules related to data types that all language must follow. It provides set of types that are used by all .NET languages and ensures .NET language type compatibility.
9. Define Virtual folder.
Answer:
It is the folder that contains web applications. The folder that has been published as virtual folder by IIS can only contain web applications.
10. Describe the Events in the Life Cycle of a Web Application
Answer:
A web application starts when a browser requests a page of the application first time. The request is received by the IIS which then starts ASP.NET worker process (aspnet_wp.exe). The worker process then allocates a process space to the assembly and loads it. An application_start event occurs followed by Session_start. The request is then processed by the ASP.NET engine and sends back response in the form of HTML. The user receives the response in the form of page.

The page can be submitted to the server for further processing. The page submitting triggers postback event that causes the browser to send the page data, also called as view state to the server. When server receives view state, it creates new instance of the web form. The data is then restored from the view state to the control of the web form in Page_Init event.

The data in the control is then available in the Page_load event of the web form. The cached event is then handled and finally the event that caused the postback is processed. The web form is then destroyed. When the user stops using the application, Session_end event occurs and session ends. The default session time is 20 minutes. The application ends when no user accessing the application and this triggers Application_End event. Finally all the resources of the application are reclaimed by the Garbage collector.
11. What are the ways of preserving data on a Web Form in ASP.NET?
Answer:

ASP.NET has introduced view state to preserve data between postback events. View state can't avail data to other web form in an application. To provide data to other forms, you need to save data in a state variable in the application or session objects.
12. Define application state variable and session state variable.
Answer:
These objects provide two levels of scope:

Application State
Data stored in the application object can be shared by all the sessions of the application. Application object stores data in the key value pair.

Session State
Session State stores session-specific information and the information is visible within the session only. ASP.NET creates unique sessionId for each session of the application. SessionIDs are maintained either by an HTTP cookie or a modified URL, as set in the application’s configuration settings. By default, SessionID values are stored in a cookie.
13. Describe the application event handlers in ASP.NET
Answer:
Following are the application event handlers:

Application_Start: This event occurs when the first user visits a page of the application.
Application_End: This event occurs when there are no more users of the application.
Application_BeginRequest: This occurs at the beginning of each request to the server.
Application_EndRequest: occurs at the end of each request to the server.
Session_Start: This event occurs every time when any new user visits.
Session_End: occurs when the users stop requesting pages and their session times out.
14. What are the Web Form Events available in ASP.NET?
Answer:
Page_Init
Page_Load
Page_PreRender
Page_Unload
Page_Disposed
Page_Error
Page_AbortTransaction
Page_CommitTransaction
Page_DataBinding
15. Describe the Server Control Events of ASP.NET.
Answer:

ASP.NET offers many server controls like button, textbox, DropDownList etc. Each control can respond to the user's actions using events and event handler mechanism.

There are three types of server control events:

Postback events
This events sends the web page to the server for processing. Web page sends data back to the same page on the server.

Cached events
These events are processed when a postback event occurs.

Validation events
These events occur just before a page is posted back to the server.
16. How do you change the session time-out value?
Answer:
The session time-out value is specified in the web.config file within sessionstate element. You can change the session time-out setting by changing value of timeout attribute of sessionstate element in web.config file.
17. Describe how ASP.NET maintains process isolation for each Web application
Answer:
In ASP.NET, when IIS receives a request, IIS uses aspnet_isapi.dll to call the ASP.NET worker process (aspnet_wp.exe). The ASP.NET worker process loads the Web application's assembly, allocating one process space, called the application domain, for each application. This is the how ASP.NET maintains process isolation for each Web application.
18. Define namespace.
Answer:
Namespaces are the way to organize programming code. It removes the chances of name conflict. It is quite possible to have one name for an item accidentally in large projects those results into conflict. By organizing your code into namespaces, you reduce the chance of these conflicts. You can create namespaces by enclosing a class in a Namespace...End Namespace block.

You can use namespaces outside your project by referring them using References dialog box. You can use Imports or using statement to the code file to access members of the namespaces in code.
19. What are the options in ASP.NET to maintain state?
Answer:
Client-side state management
This maintains information on the client’s machine using Cookies, View State, and Query Strings.

Cookies
A cookie is a small text file on the client machine either in the client’s file system or memory of client browser session. Cookies are not good for sensitive data. Moreover, Cookies can be disabled on the browser. Thus, you can’t rely on cookies for state management.

View State
Each page and each control on the page has View State property. This property allows automatic retention of page and controls state between each trip to server. This means control value is maintained between page postbacks. Viewstate is implemented using _VIEWSTATE, a hidden form field which gets created automatically on each page. You can’t transmit data to other page using view state.

Querystring
Query strings can maintain limited state information. Data can be passed from one page to another with the URL but you can send limited size of data with the URL. Most browsers allow a limit of 255 characters on URL length.

Server-side state management
This kind of mechanism retains state in the server.

Application State
The data stored in the application object can be shared by all the sessions of the application. Application object stores data in the key value pair.

Session State
Session State stores session-specific information and the information is visible within the session only. ASP.NET creates unique sessionId for each session of the application. SessionIDs are maintained either by an HTTP cookie or a modified URL, as set in the application’s configuration settings. By default, SessionID values are stored in a cookie.

Database
Database can be used to store large state information. Database support is used in combination with cookies or session state.
20. Explain the difference between Server control and HTML control.
Answer:
Server events
Server control events are handled in the server whereas HTML control events are handled in the page.

State management
Server controls can maintain data across requests using view state whereas HTML controls have no such mechanism to store data between requests.

Browser detection
Server controls can detect browser automatically and adapt display of control accordingly whereas HTML controls can’t detect browser automatically.

Properties
Server controls contain properties whereas HTML controls have attributes only.
21. What are the validation controls available in ASP.NET?
Answer:
ASP.NET validation controls are:

RequiredFieldValidator: This validates controls if controls contain data.

CompareValidator: This allows checking if data of one control match with other control.

RangeValidator: This verifies if entered data is between two values.

RegularExpressionValidator: This checks if entered data matches a specific format.

CustomValidator: Validate the data entered using a client-side script or a server-side code.

ValidationSummary: This allows developer to display errors in one place.
22. Define the steps to set up validation control.
Answer:
Following are the steps to set up validation control

Drag a validation control on a web form.
Set the ControlToValidate property to the control to be validated.
If you are using CompareValidator, you have to specify the ControlToCompare property.
Specify the error message you want to display using ErrorMessage property.
You can use ValidationSummary control to show errors at one place.
23. What are the navigation ways between pages available in ASP.NET?
Answer:
Ways to navigate between pages are:

Hyperlink control
Response.Redirect method
Server.Transfer method
Server.Execute method
Window.Open script method
24. How do you open a page in a new window?
Answer:
To open a page in a new window, you have to use client script using onclick="window.open()" attribute of HTML control.
25. Define authentication and authorization.
Answer:
Authorization: The process of granting access privileges to resources or tasks within an application.

Authentication: The process of validating the identity of a user.
26. Define caching.
Answer:
Caching is the technique of storing frequently used items in memory so that they can be accessed more quickly. Caching technique allows to store/cache page output or application data on the client on the server. The cached information is used to serve subsequent requests that avoid the overhead of recreating the same information. This enhances performance when same information is requested many times by the user.
27. Define cookie.
Answer:
A cookie is a small file on the client computer that a web application uses to maintain current session information. Cookies are used to identity a user in a future session.
28. What is delegate?
Answer:
A delegate acts like a strongly type function pointer. Delegates can invoke the methods that they reference without making explicit calls to those methods. It is type safe since it holds reference of only those methods that match its signature. Unlike other classes, the delegate class has a signature. Delegates are used to implement event programming model in .NET application. Delegates enable the methods that listen for an event, to be abstract.
29. Explain Exception handling in .Net.
Answer:
Exceptions or errors are unusual occurrences that happen within the logic of an application. The CLR has provided structured way to deal with exceptions using Try/Catch block. ASP.NET supports some facilities to handling exceptions using events suck as Page_Error and Application_Error.
30. What is impersonation?
Answer:
Impersonation means delegating one user identity to another user. In ASP.NET, the anonymous users impersonate the ASPNET user account by default. You can use <identity> element of web.config file to impersonate user. E.g. <identity impersonate="true"/>
31. What is managed code in .Net?
Answer:
The code that runs under the guidance of common language runtime (CLR) is called managed code. The versioning and registration problem which are formally handled by the windows programming are solved in .Net with the introduction of managed code. The managed code contains all the versioning and type information that the CLR use to run the application.
32. What are Merge modules?
Answer:
Merge modules are the deployment projects for the shared components. If the components are already installed, the modules merge the changes rather than unnecessarily overwrite them. When the components are no longer in use, they are removed safely from the server using Merge modules facility.
33. What is Satellite assembly?
Answer:
Satellite assembly is a kind of assembly that includes localized resources for an application. Each satellite assembly contains the resources for one culture.
34. Define secured sockets layer.
Answer:
Secured Socket Layer (SSL) ensures a secured web application by encrypting the data sent over internet. When an application is using SSL facility, the server generates an encryption key for the session and page is encrypted before it sent. The client browse uses this encryption key to decrypt the requested Web page.
35. Define session in ASP.NET.
Answer:
A session starts when the browser first request a resources from within the application. The session gets terminated when either browser closed down or session time out has been attained. The default time out for the session is 20 minutes.
36. Define Tracing.
Answer:
Tracing is the way to maintain events in an application. It is useful while the application is in debugging or in the testing phase. The trace class in the code is used to diagnose problem. You can use trace messages to your project to monitor events in the released version of the application. The trace class is found in the System.Diagnostics namespace. ASP.NET introduces tracing that enables you to write debug statements in your code, which still remain in the code even after when it is deployed to production servers.
37. Define View State.
Answer:
ASP.NET preserves data between postback events using view state. You can save a lot of coding using view state in the web form. ViewState serialize the state of objects and store in a hidden field on the page. It retains the state of server-side objects between postbacks. It represents the status of the page when submitted to the server. By default, view state is maintained for each page. If you do not want to maintain the ViewState, include the directive <%@ Page EnableViewState="false" %> at the top of an .aspx page or add the attribute EnableViewState="false" to any control. ViewState exist for the life of the current page.
38. What is application domain?
Answer:
It is the process space within which ASP.NET application runs. Every application has its own process space which isolates it from other application. If one of the application domains throws error it does not affect the other application domains.
39. List down the sequence of methods called during the page load.
Answer:
Init() - Initializes the page.
Load() - Loads the page in the server memory.
PreRender() - the brief moment before the page is displayed to the user as HTML
Unload() - runs just after page finishes loading.
40. What is the importance of Global.asax in ASP.NET?
Answer:
The Global.asax is used to implement application and session level events.
41. Define MSIL.
Answer:
MSIL is the Microsoft Intermediate Language. All .Net languages' executable exists as MSIL which gets converted into machine specific language using JIT compiler just before execution.
42. Response.Redirect vs Server.Transfer
Answer:
Server.Transfer is only applicable for aspx files. It transfers page processing to another page without making round-trip back to the client's browser. Since no round trips, it offers faster response and doesn't update client url history list.

Response.Redirect is used to redirect to another page or site. This performs a trip back to the client where the client’s browser is redirected to the new page.
43. Explain Session state management options in ASP.NET.
Answer:
ASP.NET provides In-Process and Out-of-Process state management. In-Process stores the session in memory on the web server. Out-of-Process Session state management stores data in an external data source such as SQL Server or a State Server service. Out-of-Process state management requires that all objects stored in session are serializable.
44. How to turn off cookies for a page?
Answer:
Cookie.Discard Property when true, instructs the client application not to save the Cookie on the user's hard disk when a session ends.
45. How can you ensure a permanent cookie?
Answer:
Setting Expires property to MinValue and restrict cookie to get expired.
46. What is AutoPostback?
Answer:
AutoPostBack automatically posts the page back to the server when state of the control is changed.
47. Explain login control and form authentication.
Answer:
Login controls encapsulate all the features offered by Forms authentication. Login controls internally use FormsAuthentication class to implement security by prompting for user credentials validating them.
48. What is the use of Web.config file?
Answer:
Following are the setting you can incorporate in web.config file.

Database connections
Error Page setting
Session States
Error Handling
Security
Trace setting
Culture specific setting
49. Explain in what order a destructors is called.
Answer:
Destructors are called in reverse order of constructors. Destructor of most derived class is called followed by its parent's destructor and so on till the topmost class in the hierarchy.
50. What is break mode? What are the options to step through code?
Answer:
Break mode lets you to observe code line to line in order to locate error. VS.NET provides following option to step through code.

Step Into
Step Over
Step Out
Run To Cursor
Set Next Statement
51. Explain how to retrieve property settings from XML .config file.
Answer:
Create an instance of AppSettingsReader class, use GetValue method by passing the name of the property and the type expected. Assign the result to the appropriate variable.
52. Explain Global Assembly Cache.
Answer:
Global Assembly Cache is the place holder for shared assembly. If an assembly is installed to the Global Assembly Cache, the assembly can be accessed by multiple applications. In order to install an assembly to the GAC, the assembly must have to be signed with strong name.
53. Explain Managed code an Un-managed code.
Answer:
Managed code runs under the safe supervision of common language runtime. Managed code carries metadata that is used by common language runtime to offer service like memory management, code access security, and cross-language accessibility.

Unmanaged code doesn't follow CLR conventions and thus, can't take the advantages of .Framework.
54. What is side-by-side execution?
Answer:
This means multiple version of same assembly to run on the same computer. This feature enables to deploy multiple versions of the component.
55. Define Resource Files.
Answer:
Resource files contains non-executable data like strings, images etc that are used by an application and deployed along with it. You can changes these data without recompiling the whole application.
56. Define Globalization and Localization.
Answer:
Globalization is the process of creating multilingual application by defining culture specific features like currency, date and time format, calendar and other issues. Localization is the process of accommodating cultural differences in an application.
57. What is reflection?
Answer:
Reflection is a mechanism through which types defined in the metadata of each module can be accessed. The System.Reflection namespaces contains classes that can be used to define the types for an assembly.
58. Define Satellite Assemblies.
Answer:
Satellite Assemblies are the special kinds of assemblies that exist as DLL and contain culturespecific resources in a binary format. They store compiled localized application resources. They can be created using the AL utility and can be deployed even after deployment of the application. Satellite Assemblies encapsulate resources into binary format and thus makes resources lighter and consume lesser space on the disk.
59. What is CAS?
Answer:
CAS is very important part of .Net security system which verifies if particular piece of code is allowed to run. It also determines if piece of code have access rights to run particular resource. .NET security system applies these features using code groups and permissions. Each assembly of an application is the part of code group with associated permissions.
60. Explain Automatic Memory Management in .NET.
Answer:
Automatic memory management in .Net is through garbage collector which is incredibly efficient in releasing resources when no longer in use.
Latest answer: Forms authentication can be easily implemented using login controls without writing any code. Login control performs functions like prompting for user credentials, validating them and issuing authentication just as the FormsAuthentication class...............
Read answer
Latest answer: Fragment caching refers to the caching of individual user controls within a Web Form. Each user control can have independent cache durations and implementations of how the caching behavior is to be applied.............
Read answer
Latest answer: Partial classes allow us to divide the class definition into multiple files (physically). Logically, all the partial classes are treated as a single file by the compiler............
Read answer
Latest answer: FromHTMLinasppage:<ahref="abc.aspx?qstring1=test">Test Query String</a>
From server side code: <%response.redirect "webform1.aspx?id=11"%>...............
Latest answer: Viewstate is used to maintain or retain values on postback. It helps in preserving a page. Viewstate is internally maintained as a hidden field in encrypted form along with a key............
Read answer
Latest answer: Src: is a way mention the name of the code-behind class to dynamically compile on the request for a page. ...............
Read answer
Latest answer: URI - Uniform Resource Identifier: it’s a string and its responsibility is to identify a resource by meta-information. It gives information about only one resource............
Read answer
Latest answer: It is a process where things that can be handled before compilation are prepared in order to reduce the deployment time, response time, increase safety. It’s main aim to boost performance.............
Read answer
Latest answer: Custom controls are user defined controls. They can be created by grouping existing controls, by deriving the control from System.Web.UI.WebControls..........
Read answer
Latest answer: An operating system process can have many ongoing application domains. Application Domains keep an application separate. All objects created within the same application scope are created within the same application domain...........
Read answer
Latest answer: SAO Server Activated Object (call mode): lasts the lifetime of the server. They are activated as SingleCall/Singleton objects. It makes objects stateless...........
Read answer
Latest answer: Remoting has at least three sections:-
1. Server
2. Client: This connects to the hosted remoting object
3. Common Interface between client and the server .i.e. the channel..........
Read answer
Latest answer: Singleton architecture is to be used when all the applications have to use or share same data...........
Read answer
Latest answer: The LeaseTime property protects the object so that the garbage collector does not destroy it as remoting objects are beyond the scope of the garbage collector. Every object created has a default leasetime for which it will be activated..........
Read answer
Latest answer: The remoting parameters can be specified through both programming and in config files. All the settings defined in config files are placed under <system.runtime.remoting>...........
Read answer
Latest answer: Marshaling is a process of transforming or serializing data from one application domain and exporting it to another application domain...........
Read answer
Latest answer: ObjRef is a searializable object returned by Marshal() that knows about location of the remote object, host name, port number, and object name........
Read answer
Latest answer: Every service listed has a URI pointing to the service's DISCO or WSDL document, which is needed to access the webservice and its 'webmethod" methods..........
Read answer
Latest answer: Create a new website by selecting "ASP.NET Web Site" and giving it a suitable name. service.cs file appears inside the solution with a default webmethod named as "HelloWorld()"........
Read answer
Latest answer: Application Object: Application variable/object stores an Object with a scope of availability of the entire Application unless explicitly destroyed.............
Read answer
Latest answer: The cache object has dependencies e.g. relationships to the file it stores. Cache items remove the object when these dependencies change. As a work around we would need to simply execute a callback method............
Read answer
Latest answer: A process where items are removed from cache in order to free the memory based on their priority. A property called "CacheItemPriority" is used to figure out the priority of each item inside the cache...........
Read answer
Latest answer: Page output: Is used to fetch information or data at page level. It is best used when the site is mainly static. Used by declaring the output page directive............
Read answer
Latest answer: The ways to cache different versions on the same page using ASP.NET cache object is using OutputCache object............
Read answer
Latest answer: Fragment cache is to store user controls individually within a web form in cache instead of the whole webform as such. The idea is to simply have different cache parameters for different user controls.............
Read answer
Latest answer: Types of sessions: InProc: The default way to use sessions. InProc is the fastest way to store and access sessions...........
Read answer
Latest answer: Advantages: Easy to implement, Hidden fields are supported by all browsers, Enables faster access of information because data is stored on client side............
Read answer
Latest answer: Advantages: Hidden frames allow you to cache more than one data field, The ability to cache and access data items stored in different hidden forms...........
Read answer
Latest answer: Advantages: They are simple to use. Light in size, thus occupy less memory. Stores server information on client side. Data need not to be sent back to server........
Read answer
Latest answer: Querystring is way to transfer information from one page to another through the URL........
Read answer
Latest answer: Absolute and sliding expiration are two Time based expiration strategies. Absolute Expiration: Cache in this case expires at a fixed specified date or time..............
Read answer
Latest answer: Cross-page posting is done at the control level. It is possible to create a page that posts to different pages depending on what button the user clicks on. It is handled by done by changing the postbackurl property of the controls..........
Read answer
Latest answer: PreviousPage property is set to the page property of the nest page to access the viewstate value of the page in the next page. Page poster = this.PreviousPage;..........
Read answer
Latest answer: SQL Cache Dependency in ASP.NET: It is the mechanism where the cache object gets invalidated when the related data or the related resource is modified.........
Read answer
Latest answer: Post Cache Substitution: It works opposite to fragment caching. The entire page is cached, except what is to be kept dynamic. When [OutputCache] attribute is used, the page is cached............
Read answer
Latest answer: Users of different countries, use different languages and others settings like currency, and dates. Therefore, applications are needed to be configurable as per the required settings based on cultures, regions, countries........
Read answer
Latest answer: Code Page was used before Unicode came into existence. It was a technique to represent characters in different languages..........
Read answer
Latest answer: Resource files are files in XML format. They contain all the resources needed by an application. These files can be used to store string, bitmaps, icons, fonts........
Read answer
Latest answer: To support the feature of multiple languages, we need to create different modules that are customized on the basis of localization. These assemblies created on the basis of different modules are knows as satellite assemblies...........
Read answer
Latest answer: Al.exe: It embeds the resources into a satellite assembly. It takes the resources in .resources binary format.......
Read answer
Latest answer: ResourceManager class: It provides convenient access to resources that are culture-correct. The access is provided at run time.........
Read answer
Latest answer: WCF is a framework that builds applications that can inter-communicate based on service oriented architecture consuming secure and reliable web services.............
Read answer
Latest answer: A service-oriented architecture is collection of services which communicate with one another other......
Read answer
Latest answer: WCF Service is composed of three components: Service class: It implements the service needed, Host environment: is an environment that hosts the developed service.............
Read answer
Latest answer: WCF can create services similar in concept to ASMX, but has much more capabilities. WCF is much more efficient than ASP.Net coz it is implemented on pipeline............
Read answer
Latest answer: BasicHttpBinding, WSHttpBinding, WSDualHttpBinding.......
Read answer
Latest answer: Duplex contract: It enables clients and servers to communicate with each other. The calls can be initiated independently of the other one.............
Read answer
Latest answer: Read Uncommitted: - Also known as Dirty isolation level. It makes sure that corrupt Data cannot be read. This is the lowest isolation level............
Read answer
Latest answer: Volatile Queues: There are scenarios in the project when you want the message to deliver in proper time. The timely delivery of message is very more important and to ensure they are not lost is important too. Volatile queues are used for such purposes.............
Read answer
Latest answer: Windows Workflow Foundation (WF): It is a platform for building, managing and executing workflow-enabled applications, for designing and implementing a programming model ..........
Read answer
Latest answer: There are 3 types of workflows in WWF: Sequential Workflow: The sequential workflow style executes a set of contained activities in order, one by one and does not provide an option to go back to any step...........
Read answer
Latest answer: XOML is an acronym for Extensible Object Markup Language. XOML files are the markup files. They are used to declare the workflow and are then compiled with the file containing the implementation logic..............
Read answer
Latest answer: Microsoft's Internet Information Services web server software is used to make an application offline. The IIS is instructed to route all incoming requests for the web site to another URL automatically........
Read answer
Latest answer: Script injection attacks called Cross-site scripting (XSS) attacks exploit vulnerabilities in Web page validation by injecting client-side script code.............
Read answer
Latest answer: Authentication is the process of verifying user’s details and find if the user is a valid user to the system or not. This process of authentication is needed to provide authority to the user........
Read answer
Latest answer: Authorization is a process that takes place based on the authentication of the user. Once authenticated, based on user’s credentials, it is determined what rights des a user have...........
Read answer
Login controls are part of ASP. Net’s UI controls collection which allows users to enter their username and password to login to a website/application. They provide login solution without the need of writing code...........
Read answer
Fragment caching does not cache a WebForm, rather it allows for caching of individual user controls within a Web Form, where each control can have different cache duration and behavior...........
Read answer
.Net2.0 supports the concept of partial classes which is unlike the concept of one class one file. In .Net technology, one can define a single class over multiple files using the concept of partial classes............
Read answer
Yesyoucandoitusingahyperlink<BR><ahref="Abc.aspx?name=test">Click to go to aspx </a>.............
Read answer
.NET Compact Framework is a scaled down versions of .NET framework for supporting Windows CE based mobile and embedded devices like mobile phones...............
LINQ is a set of extensions to .NET Framework that encapsulate language integrated query, set and other transformation operations....................
Access modifiers are used to control the scope of type members.
There arefive access modifiers that p rovide varying levels of access...........
Read answer
System.Web.UI.Page.......... 
Read answer
Overriding - Methods have the same signature as the parent class method............
Read answer
System.Web.UI.Page.Culture............
Read answer
In C#.NET, we implement using  ":"
In VB.Net we implements using "Inherits" keyword...........
Read answer
Server-side code executes on the server.
Client-side code executes in the client's browser..........  
Read answer
A Dataset can represent an entire relational database in memory, complete with tables, relations, and views...............
Read answer
The Global.asax is including the Global.asax.cs file.
You can implement application........
Read answer
These subroutines set the variables for the Application and Session objects.........
Read answer
Inline code written along side the html in a page.
Code-behind is code written in a separate file and referenced by the .aspx page........
Read answer
MSIL is the Microsoft Intermediate Language.
.NET compatible application will get converted to MSIL on compilation...........
Read answer
The Page class...........
Read answer
Low (IIS Process): This is the fastest and the default IIS4 setting. ASP pages run in INetInfo.exe and so they are executed in-process. If ASP crashes, IIS too does and must be restarted...........
What is Shared (static) member?
It belongs to the type but not to any instance of a type.
It can be accessed without creating an instance of the type..............
Read answer
What is the transport protocol you use to call a Web service?
SOAP (Simple Object Access Protocol) is the preferred protocol................
Read answer
What is Option Strict used for?
Option Strict On enables type checking at design time and prevents.............
Read answer
Define Boxing an Unboxing.  
Boxing allows you to treat a value type the same as a reference type........
Read answer

What does WSDL stand for?
Web Services Description Language..........
Read answer
Define ViewState in ASP.NET.
It allows the state of objects (serializable) to be stored in a hidden field on the page.
It is transported to the client and back to the server, and is not stored on the server or any other external source............... 
Read answer
What is the lifespan for items stored in ViewState?
Items stored in the ViewState exist for the life of the current page...........
Read answer
Define EnableViewState property.
It allows the page to save the users input on a form across postbacks.
It saves the server-side values for a given control into ViewState.............
Read answer
What are Delegates?
Delegates provide the functionality behind events.
A delegate is a strongly typed function pointer................
Read answer
What are Classes?
Classes are the blueprints for objects.
A class acts as a template for any number of distinct objects.........
Read answer
What is Encapsulation?
The data of an object should never be made available to other objects...........
Read answer
Different types of Session state management options available with ASP.NET?
ASP.NET provides In-Process and Out-of-Process state management.
In-Process stores the session in memory on the web server.............
Read answer
What methods are fired during the page load?
Init() - when the page is instantiated.
Load() - when the page is loaded into server memory.........
Read answer
Explain ADO.NET.
It is data-access technology, primarily disconnected and designed to provide efficient, scalable data  access. The disconnected data is represented within a DataSet object............. 
Define Server-side and Client-side code in ASP.NET.
Server-side code runs on the server.Client-side code runs on the client's browser................
Read answer
What tag do you use to add a hyperlink column to the DataGrid?
<asp:HyperLinkColumn>.............
Read answer 
Where does VS.NET store Web application projects?
Web application projects create a virtual folder for each project where all the files of the projects are stored.........
Read answer
Describe Web application’s life cycle.
A Web application starts with the first request for a resource. On request, Web forms are instantiated and processed in the server...........
Read answer
Define class module and a code module.
Steps to execute a stored procedure from Web Application.
Create a command object.  Set the object’s CommandText property to the name of the stored procedure.
Set the CommandType property to stored Procedure............ 
Read answer
Describe exception handling in ASP.NET.
Exception handling correct unusual occurrences and prevent application from getting terminated.........
Read answer
What are the exception-handling ways in ASP.NET?
Exceptions can be handled by using Try(try) block and Error event procedures at the global, application, or page levels by using the Server object’s GetLastError and ClearError methods..........
Describe use of error pages in ASP.NET.
Error pages are used when exceptions are outside the scope of the application and the application can’t respond directly to these exceptions................
Read answer
Explain tracing in ASP.NET.
Tracing records unusual events while an application is running. It helps in observing problems during testing and after deployment.............
Read answer
What is the use of ComVisible attribute?
ComVisible attribute is used to select which public .NET classes and members are visible to COM.........
Read answer
Define Windows and Forms authentication.
Windows authentication is the default authentication method of the ASP.NET application. It uses security scheme of windows operating system of corporate network.............
Read answer
What is Secure Sockets Layer (SSL) security?
SSL protects data exchanged between a client and an ASP.NET application by encrypting the data before it is sent across the internet.............
Read answer
Why is the Machine.config file?
The Machine.config file controls issue like process recycling, number of request queue limits, and what interval to check if user is connected..........
Read answer
Explain how to distribute shared components as part of an installation program
Shared components should be included as a merge module within the setup project. Merge modules can’t be installed by themselves..................
Read answer
Define Unit testing, Integration testing, Regression testing.
Unit testing ensures that each piece of code works correctly. Integration testing ensures each module work together without errors............
Read answer
Define HTML and XML. 
HTML: It has predefined elements names '<h1>', '<b>' etc.............
·          
·         ASP.NET part 6
·         ASP.NET part 7
·         ASP.NET part 8
·         ASP.NET part 9
·         ASP.NET part 10
·         ASP.NET part 11
·         Test ASP.NET skills New
·         Test C#.NET skills New
·         Test VB.NET skills New
·         ASP.NET Advantages
·         ASP.NET Issues
·         ASP.NET Life cycle
·         ASP.NET Server control
·         ASP.NET Server vs. HTML
·         ASP.NET Datalist control
·         ASP.NET Applcn & session
·         ASP.NET Navigation method
·         ASP.NET Validation control
·         ASP.NET State Management
·         ASP.NET Caching
·         ASP.NET Exception Handling
·         ASP.NET Master pages
·         ASP.NET resources
·         ASP.NET session state
·         ASP.NET authentication
·         ASP.NET Globalization
·         Net mobile
·         LINQ
·         .NET compact framework
·         Silverlight
http://careerride.com/images/44.gif
http://careerride.com/images/transperent.gif
http://careerride.com/images/33.gif

ASP.NET interview questions

ASP.NET frequently asked interview questions 

Next>>
Part 1 | Part 2 | Part 3 | Part 4 | part 5 | part 6 | part 7 | part 8 | part 9  
What is AppSetting Section in “Web.Config” file? 
Latest answer: AppSetting section is used to set the user defined values. For e.g.: The ConnectionString which is used through out the project for database connection.........
Read answer
Difference between Server.Transfer and response.Redirect.
Latest answer: Following are the major differences between them: Server.Transfer - The browser is directly redirected to another page. There is no round trip...........
Read answer
Difference between authentication and authorization.
Latest answer: Authentication is the process of verifying the identity of a user. Authorization is process of checking whether the user has access rights to the system..............
Read answer
What is impersonation in ASP.NET?
Latest answer: By default, ASP.NET executes in the security context of a restricted user account on the local machine. However, at times it becomes necessary to access network resources which require additional permissions.............
Read answer
What is event bubbling in .NET?
Latest answer: The passing of the control from the child to the parent is called as bubbling. Controls like DataGrid, Datalist, Repeater, etc can have child controls..........
Read answer
Describe how the ASP.NET authentication process works.
Latest answer: ASP.NET runs inside the process of IIS due to which there are two authentication layers which exist in the system.............
Read answer
Explain the ways of authentication techniques in ASP.NET
Latest answer: Selection of an authentication provider is done through the entries in the web.config file for an application.The modes of authentication are:.........
Read answer
Windows authentication.
Latest answer: If windows authentication mode is selected for an ASP.NET application, then authentication also needs to be configured within IIS since it is provided by IIS............
Read answer
Passport authentication
Latest answer: Passport authentication provides authentication using Microsoft’s passport service.
If passport authentication is configured and users login using passport then the authentication duties are off-loaded to the passport servers.............
Read answer
Forms authentication
Latest answer: Using form authentication, ones own custom logic can be used for authentication. ASP.NET checks for the presence of a special session cookie when a user requests a page for the application. ............
Read answer
Explain how authorization works in ASP.NET
Latest answer: ASP.NET impersonation is controlled by entries in the applications web.config file. Though the default setting is no impersonation, it can be explicitly set using: ...........
Read answer
Difference between Datagrid, Datalist and repeater.
Latest answer: Datagrid: The HTML code generated has an HTML TABLE element created for the particular DataRow and is a tabular representation with Columns and Rows. Datagrid has a in-built support for Sort, Filter and paging the Data...........
Read answer
What are the events in GLOBAL.ASAX file?
Latest answer: Global.asax file contains the following events: Application_Init - Fired when an application initializes or is first called. It is invoked for all HttpApplication object instances.............
Read answer
What are different IIS isolation levels supported in ASP.NET?
Latest answer: IIS has three level of isolation:- LOW (IIS process): In this main IIS process and ASP.NET application run in same process due to which if one crashes, the other is also affected............
Read answer
Difference between Gridlayout and FlowLayout.
Latest answer: GridLayout provides absolute positioning for controls placed on the page. FlowLayout positions items down the page like traditional HTML.........
Read answer
What is Authentication in ASP.NET?
Latest answer: Authentication is the process of verifying user’s details and find if the user is a valid user to the system or not.......
Read answer
What is Authorization in ASP.NET?
Latest answer: Authorization is a process that takes place based on the authentication of the user.......
Read answer
Explain the concept of Automatic Memory Management in ASP.NET.
Latest answer: 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..........
Read answer
What is Finalizer in .NET?
Latest answer: Finalizer in .NET are the methods that help in cleanup the code that is executed just before the object is garbage collected..............
Read answer
Explain the types of cookies in ASP.NET.
Latest answer: There are two types of cookies in ASP.NET -Single valued cookies................
Read answer
What are the ways to retain variables between requests?
Latest answer: Following are the ways to retain variables between requests:Context.Handler -This object can be used to retrieve public members of the web form from a subsequent web page...........
Read answer
Describe the Cookies collection in ASP.NET.
Latest answer: Cookies are text files that store information about the user. A user is differentiated from the other by the web server with the help of the cookies. It can also determine where the user had been before with them.............
Read answer
What is the Common Language Specification (CLS)?
Latest answer: The CLS contains constructs and constraints which provides a guideline for library and compiler writers.Any language that supports CLS can then use the libraries due to whic the languages can integrate with each other................
Read answer
What are server controls?   
ASP.NET server controls are components that run on the server and encapsulate user-interface and other related functionality. They are used in ASP.NET pages and in ASP.NET code-behind classes.
What is the difference between Web User Control and Web Custom Control?
Custom Controls
Web custom controls are compiled components that run on the server and that encapsulate user-interface and other related functionality into reusable packages. They can include all the design-time features of standard ASP.NET server controls, including full support for Visual Studio design features such as the Properties window, the visual designer, and the Toolbox There are several ways that you can create Web custom controls: You can compile a control that combines the functionality of two or more existing
controls. For example if you need a control that encapsulates a button and a text box, you can create it by compiling the existing controls together. · If an existing server control almost meets your requirements but lacks some required features, you can customize the control by deriving from it and overriding its properties, methods, and events. if none of the existing Web server controls (or their combinations) meet your requirements, you can create a custom control by deriving from one of the base control classes. 
These classes provide all the basic functionality of Web server controls, so you can focus on programming the features you need. If none of the existing ASP.NET server controls meet the specific requirements of your applications, you can create either a Web user control or a Web custom control that encapsulates the functionality you need. The main difference between the two controls lies in ease of creation vs. ease of use at design time.
Web user controls are easy to make, but they can be less convenient to use in advanced scenarios. You develop Web user controls almost exactly the same way that you develop Web Forms pages. Like Web Forms, user controls can be created in the visual designer, they can be written with code separated from the HTML, and they can handle execution events. However, because Web user controls are compiled dynamically at run time they cannot be added to the Toolbox, and they are represented by a simple placeholder glyph when added to a page. This makes Web user controls harder to use if you are accustomed to full Visual Studio .NET design-time support, including the Properties window and Design view previews. Also, the only way to share the user control between applications is to put a separate copy in each application, which takes more maintenance if you make changes to the control.
Web custom controls are compiled code, which makes them easier to use but more difficult to create; Web custom controls must be authored in code. Once you have created the control, however, you can add it to the Toolbox and display it in a visual designer with full Properties window support and all the other design-time features of ASP.NET server controls. 
In addition, you can install a single copy of the Web custom control in the global assembly cache and share it between applications, which makes maintenance easier.Web user controls Web custom controls/Easier to create Harder to create/ Limited support for consumers who use a visual design tool Full visual design tool support for consumers A separate copy of the control is required in each application Only a single copy of the control is required, in the global assembly cache Cannot be added to the Toolbox in Visual Studio Can be added to the Toolbox in Visual Studio Good for static layout Good for dynamic layout

(Session/State)
7. Application and Session Events
The ASP.NET page framework provides ways for you to work with events that can be raised when your application starts or stops or when an individual user's session starts or stops:
· Application events are raised for all requests to an application. For example, Application_BeginRequest is raised when any Web Forms page or XML Web service in your application is requested. This event allows you to initialize resources that will be used for each request to the application. A corresponding event, Application_EndRequest, provides you with an opportunity to close or otherwise dispose of resources used for the request.
· Session events are similar to application events (there is a Session_OnStart and a Session_OnEnd event), but are raised with each unique session within the application. A session begins when a user requests a page for the first time from your application and ends either when your application explicitly closes the session or when the session times out.
You can create handlers for these types of events in the Global.asax file.
8. Difference between ASP Session and ASP.NET Session?
asp.net session supports cookie less session & it can span across multiple servers.
9. What is cookie less session? How it works?
By default, ASP.NET will store the session state in the same process that processes the request, just as ASP does. If cookies are not available, a session can be tracked by adding a session identifier to the URL. This can be enabled by setting the following:
<sessionState cookieless="true" />
http://samples.gotdotnet.com/quickstart/aspplus/doc/stateoverview.aspx
10. How you will handle session when deploying application in more than a server? Describe session handling in a webfarm, how does it work and what are the limits?
By default, ASP.NET will store the session state in the same process that processes the request, just as ASP does. Additionally, ASP.NET can store session data in an external process, which can even reside on another machine. To enable this feature:
· Start the ASP.NET state service, either using the Services snap-in or by executing "net start aspnet_state" on the command line. The state service will by default listen on port 42424. To change the port, modify the registry key for the service: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\Port
· Set the mode attribute of the <sessionState> section to "StateServer".
· Configure the stateConnectionString attribute with the values of the machine on which you started aspnet_state.
The following sample assumes that the state service is running on the same machine as the Web server ("localhost") and uses the default port (42424):
<sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" />

Note that if you try the sample above with this setting, you can reset the Web server (enter iisreset on the command line) and the session state value will persist.
**
11. What method do you use to explicitly kill a users session?
Abandon()
12. What are the different ways you would consider sending data across pages in ASP (i.e between 1.asp to 2.asp)?
Session
public properties
13. What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?
Web pages are recreated each time the page is posted to the server. In traditional Web programming, this would ordinarily mean that all information associated with the page and the controls on the page would be lost with each round trip.
To overcome this inherent limitation of traditional Web programming, the ASP.NET page framework includes various options to help you preserve changes — that is, for managing state. The page framework includes a facility called view state that automatically preserves property values of the page and all the controls on it between round trips.
However, you will probably also have application-specific values that you want to preserve. To do so, you can use one of the state management options.
Client-Based State Management Options:
View State
Hidden Form Fields
Cookies
Query Strings
Server-Based State Management Options
Application State
Session State
Database Support
14. What are the disadvantages of view state / what are the benefits?
Automatic view-state management is a feature of server controls that enables them to repopulate their property values on a round trip (without you having to write any code). This feature does impact performance, however, since a server control's view state is passed to and from the server in a hidden form field. You should be aware of when view state helps you and when it hinders your page's performance.
15. When maintaining session through Sql server, what is the impact of Read and Write operation on Session objects? will performance degrade?
Maintaining state using database technology is a common practice when storing user-specific information where the information store is large. Database storage is particularly useful for maintaining long-term state or state that must be preserved even if the server must be restarted.
**
16. What are the contents of cookie?
**
17. How do you create a permanent cookie?
**
18. What is ViewState? What does the "EnableViewState" property do? Why would I want it on or off?
**
19. Explain the differences between Server-side and Client-side code?
Server side code will process at server side & it will send the result to client. Client side code (javascript) will execute only at client side.
20. Can you give an example of what might be best suited to place in the Application_Start and Session_Start subroutines?
**
21. Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared web hosting platform?
A: Many of the ASP.NET configuration options are not configurable at the site, application or subdirectory level on the shared hosting platform. Certain options can affect the security, performance and stability of the server and, therefore cannot be changed. The following settings are the only ones that can be changed in your site’s web.config file (s):
browserCaps
clientTarget
pages
customErrors
globalization
authorization
authentication
webControls
webServices
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconaspnetconfiguration.asp
22. Briefly describe the role of global.asax?
23. How can u debug your .net application?
24. How do u deploy your asp.net application?
25. Where do we store our connection string in asp.net application?
26. Various steps taken to optimize a web based application (caching, stored procedure etc.)

27. How does ASP.NET framework maps client side events to Server side events.

(Security)
28. Security types in ASP/ASP.NET? Different Authentication modes?
29. How .Net has implemented security for web applications?
30. How to do Forms authentication in asp.net?
31. Explain authentication levels in .net ?
32. Explain autherization levels in .net ?
33. What is Role-Based security?
A role is a named set of principals that have the same privileges with respect to security (such as a teller or a manager). A principal can be a member of one or more roles. Therefore, applications can use role membership to determine whether a principal is authorized to perform a requested action.
**
34. How will you do windows authentication and what is the namespace? If a user is logged under integrated windows authentication mode, but he is still not able to logon, what might be the possible cause for this? In ASP.Net application how do you find the name of the logged in person under windows authentication?
35. What are the different authentication modes in the .NET environment?
36. <authentication mode="Windows|Forms|Passport|None">
37. <forms name="name"
38. loginUrl="url"
39. protection="All|None|Encryption|Validation"
40. timeout="30" path="/" >
41. requireSSL="true|false"
42. slidingExpiration="true|false">
43. <credentials passwordFormat="Clear|SHA1|MD5">
44. <user name="username" password="password"/>
45. </credentials>
46. </forms>
47. <passport redirectUrl="internal"/>
</authentication>
Attribute Option Description
mode Controls the default authentication mode for an application.
Windows Specifies Windows authentication as the default authentication mode. Use this mode when using any form of Microsoft Internet Information Services (IIS) authentication: Basic, Digest, Integrated Windows authentication (NTLM/Kerberos), or certificates.
Forms Specifies ASP.NET forms-based authentication as the default authentication mode.
Passport Specifies Microsoft Passport authentication as the default authentication mode.
None Specifies no authentication. Only anonymous users are expected or applications can handle events to provide their own authentication.
48. How do you specify whether your data should be passed as Query string and Forms (Mainly about POST and GET)
Through attribute tag of form tag.
49. What is the other method, other than GET and POST, in ASP.NET?
50. What are validator? Name the Validation controls in asp.net? How do u disable them? Will the asp.net validators run in server side or client side? How do you do Client-side validation in .Net? How to disable validator control by client side JavaScript?
A set of server controls included with ASP.NET that test user input in HTML and Web server controls for programmer-defined requirements. Validation controls perform input checking in server code. If the user is working with a browser that supports DHTML, the validation controls can also perform validation ("EnableClientScript" property set to true/false) using client script.
The following validation controls are available in asp.net:
RequiredFieldValidator Control, CompareValidator Control, RangeValidator Control, RegularExpressionValidator Control, CustomValidator Control, ValidationSummary Control.
51. Which two properties are there on every validation control?
ControlToValidate, ErrorMessage
52. How do you use css in asp.net?
Within the <HEAD> section of an HTML document that will use these styles, add a link to this external CSS style sheet that
follows this form:
<LINK REL="STYLESHEET" TYPE="text/css" HREF="MyStyles.css">
MyStyles.css is the name of your external CSS style sheet.
53. How do you implement postback with a text box? What is postback and usestate?
Make AutoPostBack property to true
54. How can you debug an ASP page, without touching the code?
55. What is SQL injection?
An SQL injection attack "injects" or manipulates SQL code by adding unexpected SQL to a query.
Many web pages take parameters from web user, and make SQL query to the database. Take for instance when a user login, web page that user name and password and make SQL query to the database to check if a user has valid name and password.
Username: ' or 1=1 ---
Password: [Empty]
This would execute the following query against the users table:
select count(*) from users where userName='' or 1=1 --' and userPass=''
56. How can u handle Exceptions in Asp.Net?
57. How can u handle Un Managed Code Exceptions in ASP.Net?
58. Asp.net - How to find last error which occurred?
A: Server.GetLastError();
[C#]
Exception LastError;
String ErrMessage;
LastError = Server.GetLastError();
if (LastError != null)
ErrMessage = LastError.Message;
else
ErrMessage = "No Errors";
Response.Write("Last Error = " + ErrMessage);
59. How to do Caching in ASP?
A: <%@ OutputCache Duration="60" VaryByParam="None" %>
VaryByParam value Description
none One version of page cached (only raw GET)
* n versions of page cached based on query string and/or POST body
v1 n versions of page cached based on value of v1 variable in query string or POST body
v1;v2 n versions of page cached based on value of v1 and v2 variables in query string or POST body
60. <%@ OutputCache Duration="60" VaryByParam="none" %>
<%@ OutputCache Duration="60" VaryByParam="*" %>
<%@ OutputCache Duration="60" VaryByParam="name;age" %>
The OutputCache directive supports several other cache varying options
· VaryByHeader - maintain separate cache entry for header string changes (UserAgent, UserLanguage, etc.)
· VaryByControl - for user controls, maintain separate cache entry for properties of a user control
· VaryByCustom - can specify separate cache entries for browser types and version or provide a custom GetVaryByCustomString method in HttpApplicationderived class
61. What is the Global ASA(X) File?
62. Any alternative to avoid name collisions other then Namespaces.
A scenario that two namespaces named N1 and N2 are there both having the same class say A. now in another class i ve written
using N1;using N2;
and i am instantiating class A in this class. Then how will u avoid name collisions?
Ans: using alias
Eg: using MyAlias = MyCompany.Proj.Nested;
63. Which is the namespace used to write error message in event Log File?
64. What are the page level transaction and class level transaction?
65. What are different transaction options?
66. What is the namespace for encryption?
67. What is the difference between application and cache variables?
68. What is the difference between control and component?
69. You ve defined one page_load event in aspx page and same page_load event in code behind how will prog run?
70. Where would you use an IHttpModule, and what are the limitations of any approach you might take in implementing one?
71. Can you edit data in the Repeater control? Which template must you provide, in order to display data in a Repeater control? How can you provide an alternating color scheme in a Repeater control? What property must you set, and what method must you call in your code, in order to bind the data from some data source to the Repeater control?
72. What is the use of web.config? Difference between machine.config and Web.config?
ASP.NET configuration files are XML-based text files--each named web.config--that can appear in any directory on an ASP.NET
Web application server. Each web.config file applies configuration settings to the directory it is located in and to all
virtual child directories beneath it. Settings in child directories can optionally override or modify settings specified in
parent directories. The root configuration file--WinNT\Microsoft.NET\Framework\<version>\config\machine.config--provides
default configuration settings for the entire machine. ASP.NET configures IIS to prevent direct browser access to web.config
files to ensure that their values cannot become public (attempts to access them will cause ASP.NET to return 403: Access
Forbidden).
At run time ASP.NET uses these web.config configuration files to hierarchically compute a unique collection of settings for
each incoming URL target request (these settings are calculated only once and then cached across subsequent requests; ASP.NET
automatically watches for file changes and will invalidate the cache if any of the configuration files change).
http://samples.gotdotnet.com/quickstart/aspplus/doc/configformat.aspx
73. What is the use of sessionstate tag in the web.config file?
Configuring session state: Session state features can be configured via the <sessionState> section in a web.config file. To double the default timeout of 20 minutes, you can add the following to the web.config file of an application:
<sessionState
timeout="40"
/>
74. What are the different modes for the sessionstates in the web.config file?
Off Indicates that session state is not enabled.
Inproc Indicates that session state is stored locally.
StateServer Indicates that session state is stored on a remote server.
SQLServer Indicates that session state is stored on the SQL Server.
75. What is smart navigation?
When a page is requested by an Internet Explorer 5 browser, or later, smart navigation enhances the user's experience of the page by performing the following:
· eliminating the flash caused by navigation.
· persisting the scroll position when moving from page to page.
· persisting element focus between navigations.
· retaining only the last page state in the browser's history.
Smart navigation is best used with ASP.NET pages that require frequent postbacks but with visual content that does not change dramatically on return. Consider this carefully when deciding whether to set this property to true.
Set the SmartNavigation attribute to true in the @ Page directive in the .aspx file. When the page is requested, the dynamically generated class sets this property.
76. In what order do the events of an ASPX page execute. As a developer is it important to undertsand these events?
77. How would you get ASP.NET running in Apache web servers - why would you even do this?
78. What tags do you need to add within the asp:datagrid tags to bind columns manually
79. What base class do all Web Forms inherit from?
System.Web.UI.Page
80. How can we create pie chart in asp.net?
81. Is it possible for me to change my aspx file extension to some other name?
Yes.
Open IIS->Default Website -> Properties
Select HomeDirectory tab
Click on configuration button
Click on add. Enter aspnet_isapi details (C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\aspnet_isapi.dll | GET,HEAD,POST,DEBUG)

Open machine.config(C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\CONFIG) & add new extension under <httpHandlers> tag
<add verb="*" path="*.santhosh" type="System.Web.UI.PageHandlerFactory"/>
82. What is AutoEventWireup attribute for ?




What is view state and use of it?
The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested for the first time versus when the form is posted (sent to the server), which allows you to program accordingly.

What are user controls and custom controls?
Custom controls:

A control authored by a user or a third-party software vendor that does not belong to the .NET Framework class library. This is a generic term that includes user controls. A custom server control is used in Web Forms (ASP.NET pages). A custom client control is used in Windows Forms applications.

User Controls:
In ASP.NET: A user-authored server control that enables an ASP.NET page to be re-used as a server control. An ASP.NET user control is authored declaratively and persisted as a text file with an .ascx extension. The ASP.NET page framework compiles a user control on the fly to a class that derives from the System.Web.UI.UserControl class.

What are the validation controls?
A set of server controls included with ASP.NET that test user input in HTML and Web server controls for programmer-defined requirements. Validation controls perform input checking in server code. If the user is working with a browser that supports DHTML, the validation controls can also perform validation using client script.

What's the difference between Response.Write() andResponse.Output.Write()?
The latter one allows you to write formattedoutput.

What methods are fired during the page load? Init()
When the page is instantiated, Load() - when the page is loaded into server memory,PreRender () - the brief moment before the page is displayed to the user as HTML, Unload() - when page finishes loading.

Where does the Web page belong in the .NET Framework class hierarchy?
System.Web.UI.Page

Where do you store the information about the user's locale?
System.Web.UI.Page.Culture

What's the difference between Codebehind="MyCode.aspx.cs" and Src="MyCode.aspx.cs"?
CodeBehind is relevant to Visual Studio.NET only.

What's a bubbled event?
When you have a complex control, likeDataGrid, writing an event processing routine for each object (cell, button,row, etc.) is quite tedious. The controls can bubble up their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.
Suppose you want a certain ASP.NET function executed on MouseOver over a certain button.

Where do you add an event handler?
It's the Attributesproperty, the Add function inside that property.
e.g. btnSubmit.Attributes.Add("onMouseOver","someClientCode();")

What data type does the RangeValidator control support?
Integer,String and Date.

What are the different types of caching?
Caching is a technique widely used in computing to increase performance by keeping frequently accessed or expensive data in memory. In context of web application, caching is used to retain the pages or data across HTTP requests and reuse them without the expense of recreating them.ASP.NET has 3 kinds of caching strategiesOutput CachingFragment CachingData
CachingOutput Caching: Caches the dynamic output generated by a request. Some times it is useful to cache the output of a website even for a minute, which will result in a better performance. For caching the whole page the page should have OutputCache directive.<%@ OutputCache Duration="60" VaryByParam="state" %>
Fragment Caching: Caches the portion of the page generated by the request. Some times it is not practical to cache the entire page, in such cases we can cache a portion of page<%@ OutputCache Duration="120" VaryByParam="CategoryID;SelectedID"%>
Data Caching: Caches the objects programmatically. For data caching asp.net provides a cache object for eg: cache["States"] = dsStates;

What do you mean by authentication and authorization?
Authentication is the process of validating a user on the credentials (username and password) and authorization performs after authentication. After Authentication a user will be verified for performing the various tasks, It access is limited it is known as authorization

Nice interview questions found in a Job Posting

Architecture - client requires at least rudimentary skills in these areas.
What is SOA? Benefits? SOA principles for WS?

Name standard architecture patterns you know

Design Patterns

What is a singleton class? Where one should use it and what is the advantage of using it?

What kind of UML diagrams do you know?

Explain how garbage collection works in .NET. How to properly release object resources?

How to expose COM dll to be reused in .NET?

How to use .NET dll in ASP 1.1?

Web Services - client requires expertise in these areas.

How to convert a class into a Web Service? Attributes to use?

When and how do you implement the asynchronous WS call? Does .NET have a support for this?

What is the transport protocol you use to call a Web service?

What does WSDL stand for?

How you make your WS discoverable?

What is WSE? What does it include?

AD- client requires at least rudimentary skills in these areas.
What is Active Directory?

What is Global Catalog?

User display name = Nick Kazanskiy, Container=users in OU=DolUsers. server= usatrame5101.staging.dmz.dtt. Write a LDAP connection string.

COM+ - client requires solid skills in these areas.

Explain transaction atomicity.


Explain consistency.



Explain integrity.



Explain durability.



Explain object pooling.

Explain JIT activation.

Explain role-based security

Explain queued components.

Explain loosely coupled events

Define scalability.
Define reliability.

Define availability.

Define security.

Define manageability.

Which namespace do the classes, allowing you to support COM functionality, are located?

How do you make a NET component talk to a COM component?.

XML- client requires solid skills in these areas.
What is XPath?

What is XSLT? And what's its use?

How to load XML in .NET? What methods and objects could be used?

How to search in XML using XPath if the namespace is defined in XML?

SQL Server – client requires some knowledge of these skills as it relates to development.
What are benefits of using views?

What kind of triggers exists?

What are restrictions on User defined functions?

What are partition views?

What does referential integrity (also called relational integrity) prevent?

What is denormalization and when would you go for it?

What's the difference between a primary key and a unique key?

Define candidate key, alternate key, and composite key.

What are defaults? Is there a column to which a default can't be bound?

What's the difference between DELETE TABLE and TRUNCATE TABLE commands?

What is an index? What are the types of indexes? How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?

What is replication? How many different types of replication exist?



ASP.NET - client requires solid skills in these areas.
Explain the differences between Server-side and Client-side code?

What type of code (server or client) is found in a Code-Behind class?

Should user input data validation occur server-side or client-side? Why?

What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?
http://msdn2.microsoft.com/ru-ru/library/aa332847(VS.71).aspx
http://msdn2.microsoft.com/en-gb/library/t9dwyts4.aspx

What is the Global.asax used for?

What are the Application_Start and Session_Start subroutines used for?

Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process.

What’s the difference between Response.Write() and Response.Output.Write()?

What methods are fired during the page load?

What is ViewState?

What is the lifespan for items stored in ViewState?

What does the "EnableViewState" property do? Why would I want it on or off?

What are the different types of Session state management options available with ASP.NET?

When during the page processing cycle is ViewState available?

What is assembly? What are assembly components?



C#- client requires solid skills in these areas.
I was trying to use an “out int” parameter in one of my functions. How should I declare the variable that I am passing to it?

If I return out of a try/finally in C#, does the code in the finally-clause run? Describe how the try/catch block works and in what sequence the exceptions need to be processed.

What statement is used to synchronize the code execution?

What is the difference between a struct and a class in C#?
http://msdn2.microsoft.com/en-us/library/ah19swz4.aspx


Is it possible to have different access modifiers on the get/set methods of a property?

Is there a way to force garbage collection?

How do you convert a string into an integer in .NET?

OOP
What is difference between Interface and Inheritance
http://msdn2.microsoft.com/en-us/library/87d83y5b.aspx
http://msdn2.microsoft.com/en-us/library/ms173149.aspx

Does .Net support Multiple Inheritance ? If not, what are alternatives?

Can you have private abstract methods?

What are the methods of object you should overwrite?

What is binary search algorithm?
·           Learn the latest, most Exclusive ASP.NET 2.0 Interview Questions & get selected wherever you want. Read http://aspnetinfo.googlepages.com
·         Q4. What is Code Refactoring?
·         Q5. What is Intellitask?
·         Q12. What are server controls?
·         Q36. What is ImageMap Control?
·         How do I send a new page to the user? 
How do I pass values between pages?
How do I pass data to a user control? 
How do I pass data back to the page from a user control? 
How do I pass a value between two user controls? 
How do I pass a value between an ASP.NET 2.0 page and its  master page? 
How do I store global variables? 
How do I store a value between PostBacks? 
How do I loop through all the controls in a form?
How do I store sensitive data securely?
Why don't any controls show up on my page at run time? 
What is a Server Control?
What's the difference between HTML controls and Web controls? 
What's the difference between User Controls and Custom Controls? 
How do I save the state of my controls between postbacks? 
How do I set the focus to a particular control on my page? 
How do I send the output of a Web control via e-mail?