What is .net?

.net framework is a programming paltform that is used to developing windows and web based software. It has number of pre-coded solutions that manage the execution of programs written specially for the framework.

.net framework has 2 main parts.

  1. Common language runtime
  2. Class library

The code of a program is compiled into Microsoft Intermediate Language (MSIL) and stored in a file called assembly. The assembly is then compiled by the CLR to native code at run-time.

The CLR (commong language runtime) has many features such as memory management, code execution, error handling, code safety verification and garbage collection. Thus appliction run under the CLR are called manage code.

How does classes are organized in .net framework?

The .Net framework has organized its classes using namespace.

The common namespace are

System System.Runtime
System.Collections System.Security
System.Configuration System.ServiceModel
System.Data System.Text
System.Diagnostics System.Threading
System.Drawing System.Web
System.IO System.Windows
System.Linq System.Workflow.*
System.Net System.Xml

What are the ways to persistent data in a web application?

Data can be persisted in the web application using any of the following mechanism.

Application State, View State, Session State

What are the different types of exceptions – handling approaches in Asp.Net web application?

Try , Catch and Finally keyword for VB, try , catch and finally for C#. Error event procedure at the Globale, Page level and Application.

Describe the purpose of error pages and why they needed.

Error page is used to trap the exceptions occur outside the scope of appliction. The exceptions of these types are identified by HTTP response code. These exceptions are handle by IIS by displaying custome error pages listed in your applications web.config.

DataSet.Clone Vs DataSet.Copy

DataSet clone copies the structure only whereas data set copy copies the structure and data.

Explain how to remove anonymous access to the IIS web application.

  1. <configuration>                                                                                                                                                                     <system.web>                                                                                                                                                                          <authorization>                                                                                                                                                                            <deny  user=?>                                                                                                                                                                      <configuration>                                                                                                                                                                    <system.web>                                                                                                                                       <authorization>

How to create custom control in Asp.Net 2.0?

Then you can add any server control like Textbox, Label, and Button etc… any you may add your functionality as your requirement. Then you build the solution, after build successfully you will get corresponding dll file in debug folder.

Then create web application, right click on Toolbox at any tab select choose items.. then you will get choose Toolbox item window, in that  window select .Net framework components Tab, then click on browse and navigate the files you have previously created then select dll file and click open button then click ok button then you will get the custom control in Toolbox at corresponding tab, then you may use the control as general server control.

Life Cycle of Asp.Net web Form

Page init, Page load, Page PreRender, Page unload, Page dispose, Page error

Define Process, Session and Cookies.

Process – Instance of the application, Session – Instance of the user accessing application, Cookie – It is used to store amount of data on Client Computer.

What is Assembly? Explain it parts?

  1. An assembly exists as .DLL and .EXE that contain MSIL code that is executed by CLR. An assembly contains interface and classes, it can also contain resources like bitmaps, files etc. It carries version details which are used by CLR during execution. Two assemblies                of the same name but with different versions can run side-by-side enabling application that depends on a specific version to use assembly of that version. An assembly is the unit on which permission are generated. It may be private or global. Private assembly used by only those applications which belongs it. And Global assembly used by any application of system.

Parts of Assembly.

Assembly Manifest – it contains version name etc.  , Type Metadata – it contains MSIL  code, Resources