ASP.NET

What is Microsoft SharePoint Portal Server?
SharePoint Portal Server is a portal server that connects people, teams, and knowledge across business processes. SharePoint Portal Server integrates information from various systems into one secure solution through single sign-on and enterprise application integration capabilities. It provides flexible deployment and management tools, and facilitates end-to-end collaboration through data aggregation, organization, and searching. SharePoint Portal Server also enables users to quickly find relevant information through customization and personalization of portal content and layout as well as through audience targeting.

What is Microsoft Windows SharePoint Services?
Windows SharePoint Services is the solution that enables you to create Web sites for information sharing and document collaboration. Windows SharePoint Services " a key piece of the information worker infrastructure delivered in Microsoft Windows Server 2003 " provides additional functionality to the Microsoft Office system and other desktop applications, and it serves as a platform for application development.
Office SharePoint Server 2007 builds on top of Windows SharePoint Services 3.0 to provide additional capabilities including collaboration, portal, search, enterprise content management, business process and forms, and business intelligence.

What are the advantages of jQuery
The advantages of using jQuery are:
1. JavaScript enhancement without the overhead of learning new syntax
2. Ability to keep the code simple, clear, readable and reusable
3. Eradication of the requirement of writing repetitious and complex loops and DOM scripting library calls

What is JQuery
JQuery is a light weight JavaScript library which provides fast and easy way of HTML DOM traversing and manipulation, its event handling, its client side animations, etc. One of the greatest features of jQuery is that jQuery supports an efficient way to implement AJAX applications because of its light weight nature and make normalize and efficient web programs.

The IHttpHandler and IHttpHandlerFactory interfaces ?
The IHttpHandler interface is implemented by all the handlers. The interface consists of one property called IsReusable. The IsReusable property gets a value indicating whether another request can use the IHttpHandler instance. The method ProcessRequest() allows you to process the current request. This is the core place where all your code goes. This method receives a parameter of type HttpContext using which you can access the intrinsic objects such as Request and Response. The IHttpHandlerFactory interface consists of two methods - GetHandler and ReleaseHandler. The GetHandler() method instantiates the required HTTP handler based on some condition and returns it back to ASP.NET. The ReleaseHandler() method allows the factory to reuse an existing handler.

Does .NET CLR and SQL SERVER run in different process?
Dot Net CLR and all .net realtes application and Sql Server run in same process or we can say that that on the same address because there is no issue of speed because if these two process are run in different process then there may be a speed issue created one process goes fast and other slow may create the problem.

What do you mean by three-tier architecture?
The three-tier architecture was comes into existence to improve management of code and contents and to improve the performance of the web based applications. There are mainly three layers in three-tier architecture. the are define as follows
(1)Presentation
(2)Business Logic
(3)Database
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->
(1)First layer Presentation contains mainly the interface code, and this is shown to user. This code could contain any technology that can be used on the client side like HTML, JavaScript or VBScript etc.
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->
(2)Second layer is Business Logic which contains all the code of the server-side .This layer have code to interact with database and to query, manipulate, pass data to user interface and handle any input from the UI as well.
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->
(3)Third layer Data represents the data store like MS Access, SQL Server, an XML file, an Excel file or even a text file containing data also some additional database are also added to that layers.

<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

When not to use Design Patterns
Do not use design patterns in any of the following situations.
• When the software being designed would not change with time.
• When the requirements of the source code of the application are unique.
If any of the above applies in the current software design, there is no need to apply design patterns in the current design and increase unnecessary complexity in the design.

The .NET Framework 3.0 is Microsoft’s managed code programming model. It is a superset of the .NET Framework 2.0, combining .NET Framework 2.0 components with new technologies for building applications that have visually stunning user experiences, seamless and secure communication, and the ability to model a range of business processes. In addition to the .NET Framework 2.0, it includes Windows Presentation Foundation (WPF), Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), and Windows CardSpace. The .NET Framework 3.0 is an additive release to the .NET Framework 2.0.

There are no changes to the version of the .NET Framework 2.0 components included in the .NET Framework 3.0. This means that the millions of developers who use .NET today can use the skills they already have to start building .NET Framework 3.0 applications. It also means that applications that run on the .NET Framework 2.0 today will continue to run on the .NET Framework 3.0.

Here’s a look at the structure of the .NET Framework 3.0:Windows Communication Foundation
Windows Communication Foundation (formerly code-named “Indigo”) is a set of .NET technologies for building and running connected systems. It is a new breed of communications infrastructure built around the Web services architecture. Advanced Web services support in Windows Communication Foundation provides secure, reliable, and transacted messaging along with interoperability. The service-oriented programming model of Windows Communication Foundation is built on the Microsoft .NET Framework and simplifies development of connected systems. Windows Communication Foundation unifies a broad array of distributed systems capabilities in a composable and extensible architecture, spanning transports, security systems, messaging patterns, encodings, network topologies, and hosting models. Windows Communication Foundation will be available for Windows Vista™ as well as for Windows XP and Windows Server 2003.

Windows Presentation Foundation
The Microsoft Windows Presentation Foundation provides the foundation for building applications and high fidelity experiences in Windows Vista, blending together application UI, documents, and media content, while exploiting the full power of your computer. The functionality extends to the support for Tablet and other forms of input, a more modern imaging and printing pipeline, accessibility and UI automation infrastructure, data driven UI and visualization, as well as the integration points for weaving the application experience into the Windows shell.

Windows Workflow Foundation
Windows Workflow Foundation is the programming model, engine and tools for quickly building workflow enabled applications on Windows. It consists of a .NET Framework version 3.0 (formerly WinFX) namespace, an in-process workflow engine, and designers for Visual Studio 2005. Windows Workflow Foundation is available for both client and server versions of Windows. Windows Workflow Foundation includes support for both system workflow and human workflow across a wide range of scenarios including: workflow within line of business applications, user interface page-flow, document-centric workflow, human workflow, composite workflow for service oriented applications, business rule driven workflow and workflow for systems management.

Windows CardSpace
Windows CardSpace (formerly “InfoCard”) is a Microsoft .NET Framework version 3.0 (formerly WinFX) component that provides the consistent user experience required by the identity metasystem. It is specifically hardened against tampering and spoofing to protect the end user’s digital identities and maintain end-user control.

What is ASP.NET?
Microsoft ASP.NET is a server side technology that enables programmers to build dynamic Web sites, web applications, and XML Web services. It is a part of the .NET based environment and is built on the Common Language Runtime (CLR) . So programmers can write ASP.NET code using any .NET compatible language.
What are the differences between ASP.NET 1.1 and ASP.NET 2.0?
A comparison chart containing the differences between ASP.NET 1.1 and ASP.NET 2.0 can be found over here.

Which is the latest version of ASP.NET? What were the previous versions released?
The latest version of ASP.NET is 2.0. There have been 3 versions of ASP.NET released as of date. They are as follows :
ASP.NET 1.0 – Released on January 16, 2002.
ASP.NET 1.1 – Released on April 24, 2003.
ASP.NET 2.0 – Released on November 7, 2005.
Additionally, ASP.NET 3.5 is tentatively to be released by the end of the 2007.
Explain the Event Life cycle of ASP.NET 2.0?
The events occur in the following sequence. Its best to turn on tracing() and track the flow of events :
PreInit – This event represents the entry point of the page life cycle. If you need to change the Master page or theme programmatically, then this would be the event to do so. Dynamic controls are created in this event.
Init – Each control in the control collection is initialized.
Init Complete* - Page is initialized and the process is completed.
PreLoad* - This event is called before the loading of the page is completed.
Load – This event is raised for the Page and then all child controls. The controls properties and view state can be accessed at this stage. This event indicates that the controls have been fully loaded.
LoadComplete* - This event signals indicates that the page has been loaded in the memory. It also marks the beginning of the rendering stage.
PreRender – If you need to make any final updates to the contents of the controls or the page, then use this event. It first fires for the page and then for all the controls.
PreRenderComplete* - Is called to explicitly state that the PreRender phase is completed.
SaveStateComplete* - In this event, the current state of the control is completely saved to the ViewState.
Unload – This event is typically used for closing files and database connections. At times, it is also used for logging some wrap-up tasks.
The events marked with * have been introduced in ASP.NET 2.0.
You have created an ASP.NET Application. How will you run it?
With ASP.NET 2.0, Visual Studio comes with an inbuilt ASP.NET Development Server to test your pages. It functions as a local Web server. The only limitation is that remote machines cannot access pages running on this local server. The second option is to deploy a Web application to a computer running IIS version 5 or 6 or 7.

Explain the AutoPostBack feature in ASP.NET?
AutoPostBack allows a control to automatically postback when an event is fired. For eg: If we have a Button control and want the event to be posted to the server for processing, we can set AutoPostBack = True on the button.

How do you disable AutoPostBack?
Hence the AutoPostBack can be disabled on an ASP.NET page by disabling AutoPostBack on all the controls of a page. AutoPostBack is caused by a control on the page.

What are the different code models available in ASP.NET 2.0?
There are 2 code models available in ASP.NET 2.0. One is the single-file page and the other one is the code behind page.

Which base class does the web form inherit from?
Page class in the System.Web.UI namespace.

Which are the new special folders that are introduced in ASP.NET 2.0?
There are seven new folders introduced in ASP.NET 2.0 :
\App_Browsers folder – Holds browser definitions(.brower) files which identify the browser and their capabilities.
\App_Code folder – Contains source code (.cs, .vb) files which are automatically compiled when placed in this folder. Additionally placing web service files generates a proxy class(out of .wsdl) and a typed dataset (out of .xsd).
\App_Data folder – Contains data store files like .mdf (Sql Express files), .mdb, XML files etc. This folder also stores the local db to maintain membership and role information.
\App_GlobalResources folder – Contains assembly resource files (.resx) which when placed in this folder are compiled automatically. In earlier versions, we were required to manually use the resgen.exe tool to compile resource files. These files can be accessed globally in the application.
\App_LocalResources folder – Contains assembly resource files (.resx) which can be used by a specific page or control.
\App_Themes folder – This folder contains .css and .skin files that define the appearance of web pages and controls.
\App_WebReferences folder – Replaces the previously used Web References folder. This folder contains the .disco, .wsdl, .xsd files that get generated when accessing remote web services.

Explain the ViewState in ASP.NET?
Http is a stateless protocol. Hence the state of controls is not saved between postbacks. Viewstate is the means of storing the state of server side controls between postbacks. The information is stored in HTML hidden fields. In other words, it is a snapshot of the contents of a page.
You can disable viewstate by a control by setting the EnableViewState property to false.

What does the EnableViewState property signify?
EnableViewState saves the state of an object in a page between postbacks. Objects are saved in a Base64 encoded string. If you do not need to store the page, turn it off as it adds to the page size.
There is an excellent article by Peter Bromberg to understand Viewstate in depth.

Explain the ASP.NET Page Directives?
Page directives configure the runtime environment that will execute the page. The complete list of directives is as follows:
@ Assembly - Links an assembly to the current page or user control declaratively.
@ Control - Defines control-specific attributes used by the ASP.NET page parser and compiler and can be included only in .ascx files (user controls).
@ Implements - Indicates that a page or user control implements a specified .NET Framework interface declaratively.
@ Import - Imports a namespace into a page or user control explicitly.
@ Master - Identifies a page as a master page and defines attributes used by the ASP.NET page parser and compiler and can be included only in .master files.
@ MasterType - Defines the class or virtual path used to type the Master property of a page.
@ OutputCache - Controls the output caching policies of a page or user control declaratively.
@ Page - Defines page-specific attributes used by the ASP.NET page parser and compiler and can be included only in .aspx files.
@ PreviousPageType - Creates a strongly typed reference to the source page from the target of a cross-page posting.
@ Reference - Links a page, user control, or COM control to the current page or user control declaratively.
@ Register - Associates aliases with namespaces and classes, which allow user controls and custom server controls to be rendered when included in a requested page or user control.
This list has been taken from here.

Explain the Validation Controls used in ASP.NET 2.0?
Validation controls allows you to validate a control against a set of rules. There are 6 different validation controls used in ASP.NET 2.0.
RequiredFieldValidator – Checks if the control is not empty when the form is submitted.
CompareValidator – Compares the value of one control to another using a comparison operator (equal, less than, greater than etc).
RangeValidator – Checks whether a value falls within a given range of number, date or string.
RegularExpressionValidator – Confirms that the value of a control matches a pattern defined by a regular expression. Eg: Email validation.
CustomValidator – Calls your own custom validation logic to perform validations that cannot be handled by the built in validators.
ValidationSummary – Show a summary of errors raised by each control on the page on a specific spot or in a message box.

How do you indentify that the page is post back?
By checking the IsPostBack property. If IsPostBack is True, the page has been posted back.

What are Master Pages?
Master pages is a template that is used to create web pages with a consistent layout throughout your application. Master Pages contains content placeholders to hold page specific content. When a page is requested, the contents of a Master page are merged with the content page, thereby giving a consistent layout.

How is a Master Page different from an ASP.NET page?
The MasterPage has a @Master top directive and contains ContentPlaceHolder server controls. It is quiet similar to an ASP.NET page.

How do you attach an exisiting page to a Master page?
By using the MasterPageFile attribute in the @Page directive and removing some markup.

How do you set the title of an ASP.NET page that is attached to a Master Page?
By using the Title property of the @Page directive in the content page. Eg:
<@Page MasterPageFile="Sample.master" Title="I hold content" %>
What is a nested master page? How do you create them?
A Nested master page is a master page associated with another master page. To create a nested master page, set the MasterPageFile attribute of the @Master directive to the name of the .master file of the base master page.
What are Themes?
Themes are a collection of CSS files, .skin files, and images. They are text based style definitions and are very similar to CSS, in that they provide a common look and feel throughout the website.

What are skins?
A theme contains one or more skin files. A skin is simply a text file with a .skin extension and contains definition of styles applied to server controls in an ASP.NET page. For eg:

Defines a skin that will be applied to all buttons throughout to give it a consistent look and feel.

What is the difference between Skins and Css files?
Css is applied to HTML controls whereas skins are applied to server controls.

What is a User Control?
User controls are reusable controls, similar to web pages. They cannot be accessed directly.
Explain briefly the steps in creating a user control?
· Create a file with .ascx extension and place the @Control directive at top of the page.
· Included the user control in a Web Forms page using a @Register directive

What is a Custom Control?
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.

What are the differences between user and custom controls?
User controls are easier to create in comparison to custom controls, however user controls can be less convenient to use in advanced scenarios.
User controls have limited support for consumers who use a visual design tool whereas custom controls have full visual design tool support for consumers.
A separate copy of the user control is required in each application that uses it whereas only a single copy of the custom control is required, in the global assembly cache, which makes maintenance easier.
A user control cannot be added to the Toolbox in Visual Studio whereas custom controls can be added to the Toolbox in Visual Studio.
User controls are good for static layout whereas custom controls are good for dynamic layout.

Where do you store your connection string information?
The connection string can be stored in configuration files (web.config).
What is the difference between ‘Web.config’ and ‘Machine.config’?
Web.config files are used to apply configuration settings to a particular web application whereas machine.config file is used to apply configuration settings for all the websites on a web server.
Web.config files are located in the application's root directory or inside a folder situated in a lower hierarchy. The machine.config is located in the Windows directory Microsoft.Net\Framework\Version\CONFIG.
There can be multiple web.config files in an application nested at different hierarchies. However there can be only one machine.config file on a web server.
What is the difference between Server.Transfer and Response.Redirect?
Response.Redirect involves a roundtrip to the server whereas Server.Transfer conserves server resources by avoiding the roundtrip. It just changes the focus of the webserver to a different page and transfers the page processing to a different page.
Response.Redirect can be used for both .aspx and html pages whereas Server.Transfer can be used only for .aspx pages.
Response.Redirect can be used to redirect a user to an external websites. Server.Transfer can be used only on sites running on the same server. You cannot use Server.Transfer to redirect the user to a page running on a different server.
Response.Redirect changes the url in the browser. So they can be bookmarked. Whereas Server.Transfer retains the original url in the browser. It just replaces the contents of the previous page with the new one.

What method do you use to explicitly kill a users session?
Session.Abandon().

What is a webservice?
Web Services are applications delivered as a service on the Web. Web services allow for programmatic access of business logic over the Web. Web services typically rely on XML-based protocols, messages, and interface descriptions for communication and access. Web services are designed to be used by other programs or applications rather than directly by end user. Programs invoking a Web service are called clients. SOAP over HTTP is the most commonly used protocol for invoking Web services.

What is Ajax?
Ajax is a set of client side technologies that provides asynchronous
communication between
user interfaces and web server. So the advantages of using Ajax are
asynchronous
communication, minimal data transfer and server is not overloaded with
unnecessary
load.

What is the basic fundamental behind Ajax?
XmlHttpRequest is the basic fundamental behind Ajax. This allows the
browser to
communicate to a back end server asynchronously.XmlHttpRequest object
allows the
browser to communicate with server with out making post backs.

1. What is a static class?
A static class is a class which can not be instantiated using the ‘new’ keyword. They also only contain static members, are sealed and have a private constructor.

2. What is static member?
A static member is a method, field, property or event that can be called without creating an instance of its defining class. Static members are particularly useful for representing calculations and data that are independent of object state.

3. What is static function?
A static function is another term for a static method. It allows you to execute the function without creating an instance of its defining class. They are similar to global functions. An example of a static function could be: ConvertFromFarenheitToCelsius with a signature as follows:

public static double ConvertFromFarenheitToCelsius (string valToConvert)
{
//add code here
}

4. What is static constructor?
A static constructor has a similar function as a normal constructor i.e. it is automatically called the first time a class is loaded. The differences between a conventional constructor are that it cannot be overloaded, cannot have any parameters nor have any access modifiers and must be preceded by the
keyword static. In addition, a class with a static constructor may only have static members.

5. How can we inherit a static variable?
6. How can we inherit a static member?
When inheriting static members there is no need to instantiate the defining class using the ‘new’ keyword.

public class MyBaseClass
{
MyBaseClass()
{
}
public static void PrintName()
{
}

}

public class MyDerivedClass : MyBaseClass
{
MyDerivedClass ()
{
}

public void DoSomething()
{
MyBaseClass.GetName();
}

}

7. Can we use a static function with a non-static variable?
No.

8. How can we access static variable?
By employing the use of a static member field as follows:
public class CashSales
{
//declare static member field
private static int maxUnitsAllowed = 50;

//declare method to return maximum number of units allowed

public static int GetMaxUnitsAllowed ()
{
Return maxUnitsAllowed;
}

}
The static field can now be accessed by simply doing CashSales.GetMaxUnitsAllowed(). No need to create an instance of the class.

9. Why main function is static?
Because it is automatically loaded by the CLR and initialised by the runtime when the class is first loaded. If it wasn’t static an instance of the class would first need to be created and initialised.

10. How will you load dynamic assembly? How will create assemblies at run time?

Load assembly:
By using classes from the System.Reflection namespace.
Assembly x = Assembly.LoadFrom( “LoadMe.dll” );

Create assembly;
Use classes from System.CodeDom.Compiler;

11. What is Reflection?
The System.Reflection namespace provides us with a series of classes that allow us to interrogate the codebase at run-time and perform functions such as dynamically load assemblies, return property info e.t.c.

12. If I have more than one version of one assembly, then how will I use old version (how/where to specify version number?) in my application?
The version number is stored in the following format: …. The assembly manifest can then contain a reference to which version number we want to use.

13. How do you create threading in.NET? What is the namespace for that?

System.Threading;

//create new thread using the thread class’s constructor

Thread myThread = new Thread(new ThreadStart (someFunction));

14. What do you mean by Serialize and MarshalByRef?
Serialization is the act of saving the state of an object so that it can be recreated (i.e deserialized) at a later date.
The MarshalByRef class is part of the System.Runtime.Remoting namespace and enables us to access and use objects that reside in different application domains. It is the base class for objects that need to communicate across application domains. MarshalByRef objects are accessed directly within their own application domain by using a proxy to communicate. With MarshalByValue the a copy of the entire object is passed across the application domain

15. What is the difference between Array and LinkedList?
An array is a collection of the same type. The size of the array is fixed in its declaration.
A linked list is similar to an array but it doesn’t have a limited size.

16. What is Asynchronous call and how it can be implemented using delegates?
A synchronous call will wait for a method to complete before program flow is resumed. With an asynchronous call the program flow continues whilst the method executes.

//create object
SomeFunction objFunc = new SomeFunction();

//create delegate
SomeDelegate objDel = new SomeDelegate(objFunc.FunctionA);

//invoke the method asynchronously (use interface IAsyncResult)
IAsyncResult asynchCall = SomeDelegate.Invoke();

17. How to create events for a control? What is custom events? How to create it?
An event is a mechanism used in a class that can be used to provide a notification when something interesting happens. (typical evens in a windows application include: change text in textbox, double click or click a button, select an item in dropdown box).

A custom event is an event created by the user that other developers can use. For example assuming that we have a CashTransaction class and we have a bank balance property in that class. We may want to set-up an event that provides a notification when the bank balance drops below a certain amount. In order to produce an event the process would be roughly as follows:

Create the class for the event derived from EventArgs.
Create a delegate with a return type of void.
Create a class containing the method that will activate the event.
Create a class with methods to handle the event.

18. If you want to write your own dot net language, what steps you will you take care?
We will need to ensure that the high level code is compiled to MSIL (Microsoft intermediate language) so that it can be interpreted by the CLR.

19. Describe the difference between inline and code behind - which is best in a loosely coupled solution?
The term ‘code behind’ refers to application code that is not embedded within the ASPX page and is separated out into a separate file which is then referenced from the ASPX page. Inline code is the traditional ASP architectural model where business logic code was embedded within the ASP page. Separating the business logic code from the presentation layer offers several advantages:

1) It allows graphic designers and web developers to work on the presentation layer whilst the application developers concentrate on the business logic.
2) The codebehind file is compiled as a single dll increasing the efficiency of the application,
3) The codebehind model offers a true OO development platform,
4) It speeds up development time as it allows developers to fully maximise the features of the .NET framework such as Cahing, ViewState, Session, Smart Navigation etc.
5) Code is much easier to maintain and susceptible for change.
6) The compiler and VS.NET provides much better support for error checking, intellisense and debugging when using the code behind model.

20. How dot net compiled code will become platform independent?
The raison d’etre for .NET was to cater for multiples languages on a single windows platform whereas the aim of Java was to be a single language on multiple platforms. The only way that .NET can be platform independent is if there is a version of the .NET framework installed on the target machine.

21. Without modifying source code if we compile again, will it be generated MSIL again?
No.

22. How does you handle this COM components developed in other programming languages in.NET?
use TlbImp.exe to import the COM types into your .NET project. If no type library for the COM component then use System.Runtime.InteropServices

22. How does you handle this COM components developed in other programming languages in.NET?
use TlbImp.exe to import the COM types into your .NET project. If no type library for the COM component then use System.Runtime.InteropServices
use RegAsm.exe to call a .NET developed component in a COM application.

23. How CCW (Com Callable Wrapper) and RCW (Runtime Callable Wrappers) works?
CCW: When a COM application calls a NET object the CLR creates the CCW as a proxy since the COM application is unable to directly access the .NET object.
RCW: When a .NET application calls a COM object the CLR creates the RCW as a proxy since the .NET application is unable to directly access the .COM object.

24. What are the new thee features of COM+ services, which are not there in COM (MTS)?
Role based security.
Neutral apartment threading.
New environment called context which defines the execution environment

25. What are the differences between COM architecture and.NET architecture?
.Net architecture has superseded the old COM architecture providing a flexible rapid application development environment which can be used to create windows, web and console applications and web services. .NET provides a powerful development environment that can be used to create objects in any .NET compliant language. .NET addresses the previous problems of dll hell with COM by providing strongly named assemblies and side-by-side execution where two assemblies with the same name can run on the same box.

26. Can we copy a COM dll to GAC folder?
No. It only stores .NET assemblies.

28. Can you explain what inheritance is and an example of when you might use it?
Inheritance is a fundamental feature of any OO language. It allows us to inherit the members and attributes from a base class to a new derived class. This leads to increased code reusability and also makes applications easier to develop, maintain and extend as the new derived class can contain new features not available in the base class whilst at the same time preserving the attributes inherited from the base class.

29. How can you write a class to restrict that only one object of this class can be created (Singleton class)?
Use the singleton design pattern.
public sealed class Singleton
{
static readonly Singleton Instance=new Singleton();

static Singleton()
{
}

Singleton()
{
}

public static Singleton Instance
{
get
{
return Instance;
}
}
}

30. What are virtual destructors?
A constructor can not be virtual but a destructor may. Use virtual destructors when you want to implement polymorphic tearing down of an object.

31. What is close method? How it different from Finalize and Dispose?
finalise is the process that allows the garbage collector to clean up any unmanaged resources before it is destroyed.
The finalise method can not be called directly; it is automatically called by the CLR. In order to allow more control over the release of unmanaged resources the .NET framework provides a dispose method which unlike finalise can be called directly by code.
Close method is same as dispose. It was added as a convenience.

32. What is Boxing and UnBoxing?
Boxing is the process of converting a value type to a reference type. More specifically it involves encapsulating a copy of the object and moving it from stack to heap. Unboxing is the reverse process.

33. What is check/uncheck?
checked: used to enable overflow checking for arithmetic and conversion functions.
unchecked: used to disable overflow checking for arithmetic and conversion functions.

what is different between BCL and FCL in dot net?
The Base Class Library (BCL), sometimes incorrectly referred to as the Framework Class Library (FCL) (which is a superset including the Microsoft.* namespaces), is a library of types available to all languages using the .NET Framework. The BCL provides classes which encapsulate a number of common functions such as file reading and writing, graphic rendering, database interaction, XML document manipulation, and so forth. The BCL is much larger than other libraries, but has much more functionality in one package.

What is difference between web.config and machine.config?
Web config file gives the configuration setting s of a particular application and machine .config contains the configuration setting of a particular machine.the web.config settings of a particular application overwrites the machine.config

What is delegate?
Delegate encapsulates a reference to a method.
It has two types,
1.Simple delegate
At a time Only one method can be invoked by single call.
e.g: del delname=new delname(obj.function_name)//To assign a method
delname()//To call that method

2.multicast delegate
At a time two or more methods can be invoked by single call.

What is virtual polymorphism?
Polymorphism means ability to take more than one form.
It likes same name but different meanings.
virtual polymorphism means method name is same for base class and derived class. It is used for instead of “override” keyword.

Panel vs GroupBox

Both panel control and Groupbox Control are the famous Container Controls.Panel and groupbox are almost same but they got minute differences

1. Panel don’t allow you to enter text in it where as you can enter the text in the Group Box.(i.e U cannot set the caption in
the panel you can do it in the groupbox)

2.Panel has Horizontal and vertical Scroll Bar, Groupbox dont support this Horizontal and vertical Scroll Bars.

3.Group box control has a visible border around it where as panel does n’t have any visible border.

AutoEventWireup attribute is used to set whether the events needs to be automatically generated or not.

In the case where AutoEventWireup attribute is set to false (by default), event handlers are automatically required for Page_Load or Page_Init.

However, when we set the value of the AutoEventWireup attribute to true, the ASP.NET runtime does not require events to specify event handlers like Page_Load or Page_Init.

Here is a collection of .Net 3.0 Interview Questions and Answers. I hope you find the list useful. Also, if you see any question un-answered feel free to answer it for the benefit of everyone. You can also Ask A Question using the link in the Menu above. Keep learning, keep sharing, keep posting.

1. What is the Windows Presentation Foundation? The Windows Presentation Foundation is the unified presentation subsystem for Windows. It consists of a display engine and a managed-code framework. The Windows Presentation Foundation unifies how Windows creates, displays, and manipulates documents, media, and user interface, which enables developers and designers to create visually-stunning, differentiated user experiences that improve customer connection. When it ships, scheduled for 2006, the Windows Presentation Foundation will be available on Windows XP, Windows Server 2003 and all future releases of the Windows operating system. When delivered, the Windows Presentation Foundation will become Microsoft’s strategic user interface technology.

2. What is the Windows Communication Foundation?
The Windows Communication Foundation is a set of technologies for building and running connected systems.

The Windows Communication Foundation is a new breed of communications infrastructure built around the Web services architecture. Advanced Web services support in the Windows Communication Foundation provides secure, reliable, and transacted messaging along with interoperability. The Windows Communication Foundation’s service-oriented programming model is built on the .NET Framework and simplifies development of connected systems. The Windows Communication Foundation unifies a broad array of distributed systems capabilities in an extensible architecture, spanning transports, security systems, messaging patterns, encodings, network topologies and hosting models. The Windows Communication Foundation will be an integral capability of Windows Vista and will also be supported on Windows XP and Windows Server 2003.

Microsoft has also done significant work to integrate the Windows Communication Foundation with existing Microsoft technologies for building distributed systems including COM+, MSMQ, and ASP.NET Web services. Applications built with those existing technologies can now be exposed as services without modification to the application. This infrastructure-level solution greatly assists developers in exposing existing applications as services. The Windows Communication Foundation also provides simple and mechanical mechanisms to migrate applications that use .NET remoting, ASP.NET Web services, and .NET Enterprise Services to natively use the Windows Communication Foundation programming model.


3. Is C# used for any core features of Windows Vista?
Yes, for example, much of the Windows Presentation Foundation is written using C#


4. Why do we need XAML as a new way to create applications in .NET Framework 3.0 (formerly WinFX)?
The new application model in Windows Vista separates out declarative code (XAML) from procedural code (C#, VB.NET, J#, etc.). One major reason for using XAML is to bridge the gap between developing an application for Microsoft Windows and developing an application for the Web.

XAML does not give you new functionality; it is just a declarative way to instantiate and initialize Microsoft .NET objects. XAML does, however, provide you with a way to solve problems such as:
When you write procedural code (C#, etc.) to create a number of controls, and compare that to the equivalent XAML, the XAML is more compact, less redundant, and less error-prone. Writing a designer for XAML will be a lot easier than writing a forms designer for C# or VB.NET, since the designer won’t have to do all that code parsing to figure out where to insert or change the setting of a property.

In the real world, many customers find requests coming in at the very last minute asking for changes to the user interface—a button needs to be moved or removed or the company logo needs to appear on every window. It is especially at the end of the development process, when you think your code is “frozen” and tested, that you’d rather not have to dive into the source code and start changing things. Who knows what subtle interaction you might break? With XAML, most—if not all—of the presentation layer is in its own file, thus providing a high degree of certainty that making a user interface change in the XAML will not break business logic code.

XAML enables professional graphic designers or user interface specialists to add beauty, style and grace to an application without modifying source files directly. Partitioning the user interface and the logic that drives it means each of us can get our job done without getting in each other’s way or having to understand the myriad details of one another’s tools.

XAML is considerably smaller than the equivalent C# code. Since there is less code, there are fewer opportunities for errors


5. Is XAML only used for quick UI prototyping?
XAML will be used for production work, not just for prototyping. Specifically, localizing your application or ensuring that it is accessible—common for most applications today—will be a lot more work if you build your own user interface from code instead of using XAML


6. Will XAML replace other programming languages like C# and VB?
No. XAML complements procedural languages, much the same way HTML complements ECMAScript. You can very quickly declare how you want your user interface to look with XAML, then use a language like C# to define the business logic behind that user interface


7. Can XAML be used to develop both Web and client-server applications?
XAML is used as part of Windows Presentation Foundation to write smart client applications that take advantage of the power of the PC and benefit from all of the power of the CLR. For Windows Presentation Foundation applications, the logic runs on the client, unlike ASP.NET, which processes on the server. ASP.NET continues to be the answer to producing powerful Web applications that take advantage of the benefits of the CLR on the server


8. Q: What is NET Framework 3.0 ?
A: NET Framework 3.0 is the managed-code programming model for Windows, starting with Windows Vista. NET Framework 3.0 is a superset of the .NET Framework, designed to expose the new functionality in Windows Vista to the developer through managed classes. If you know how to write managed code on the .NET Framework today, NET Framework 3.0 will be familiar to you. Put another way, at PDC 2000, Microsoft debuted the .NET Framework, which introduced a new managed programming model on top of our existing Windows operating systems. With Windows Vista and NET Framework 3.0, we’re keeping that managed programming model while building new core parts of the operating system, such as moving the Windows Presentation Foundation subsystem next to GDI and User.


9. Q: What is the difference between Windows Vista and .NET Framework 3.0 ?
A: The .NET Framework 3.0 is a managed-code programming model, including APIs for the Windows Presentation Foundation and the Windows Communication Foundation.


10. Q: Where is the new functionality in the .NET Framework 3.0 (such as WCF, WF, WPF, and CardSpace) installed to? Is that different from where the .NET Framework 2.0 is installed to?
A: Components shared with the .NET Framework 2.0 are installed at %windir%\Microsoft.NET\Framework\V2.0.50727. Components that are new to the .NET Framework 3.0 are installed to %windir%\Microsoft.NET\Framework\V3.0. Check out the .NET 3.0 Deployment whitepaper for more information on installation and deployment.


11. Q: How large is the .NET Framework 3.0? Does this change make the release larger?
A: There’s no change to the size of the .NET Framework 3.0 as a result of the name change from WinFX. It is about 49Mb, and that includes the .NET Framework 2.0, which is about 22Mb.


12. Q: How does servicing work for the .NET Framework 3.0? If I install the .NET Framework 3.0, can I get service updates for the .NET Framework 2.0?
Servicing will be available for the .NET Framework 2.0 components as long both it and the operating system it is installed on are still in service. Any service updates for the .NET Framework 2.0 will work for the 2.0 components installed as a part of the .NET Framework 3.0 as well.


13. Q: What operating systems will the .NET Framework 3.0 be available for?
A: The .NET Framework 3.0 will be available for and supported on Windows Vista, Windows Server 2003 (SP1), Windows Server 2003 SP2, and Windows XP (SP2).


14. Q: When will the .NET Framework 3.0 be released? A: The .NET Framework 3.0 is included as part of Windows Vista, and customers who get Windows Vista will receive the .NET Framework 3.0. The first release of Windows Vista to business customers is currently planned for November 2006, although the final date will depend on customer feedback.
At the same time, we will make the .NET Framework 3.0 broadly available for download to all customers using Windows XP and Windows Server 2003.


15. Q: How does the .NET Framework 3.0 relate to Windows Vista? A: The .NET Framework 3.0 is a core component of the Windows Vista operating system, and is installed by default on Windows Vista. It will also be available for Windows XP and Windows Server 2003.


16. Q: Are there any parts of the .NET Framework 3.0 that only work on Windows Vista? A: Though there are some optimizations in the .NET Framework 3.0 that take advantage of new functionality in Windows Vista, we’ve striven to provide a consistent experience for the .NET Framework 3.0 across Windows Vista, Windows Server 2003, and Windows XP.


17. Q: Why is the .NET Framework 3.0 a major version number of the .NET Framework if it uses the .NET Framework 2.0 runtime and compiler?
A: The new technologies delivered in the .NET Framework 3.0, including WCF, WF, WPF, and CardSpace, offer tremendous functionality and innovation, and we wanted to signal that with a major release number.


18. Q: How does “Side by Side” work for the .NET Framework 3.0?
A: Since the .NET Framework 3.0 includes only new components that are added to the .NET Framework 2.0 and there is no overlap between the assemblies of the .NET Framework 2.0 and the .NET Framework 3.0, there’s no real “Side by Side” scenario. You can run applications based on the .NET Framework 2.0 and applications based on the .NET Framework 3.0 on the same machine.


19. Q: I’m running an application built on WinFX today. Do I need to do anything different to make it run on the .NET Framework 3.0?
A: No, applications running on WinFX will now run on the .NET Framework 3.0 without any changes. Of course, since the .NET Framework 3.0 is still under development, there may be changes to the framework in the future.


20. Q: Can I remove particular .NET Framework 3.0 components?
A: No, the .NET Framework 3.0 components (WPF, WCF, WF, and CardSpace) are part of a single package, and are installed together.


21. Q: Will C# 3.0, VB.NET 9.0, Atlas, or Linq be included in the .NET Framework 3.0?
A: No, these features are planned for future releases of the .NET Framework. The .NET Framework 3.0 includes only the technology formerly described as WinFX.


22. Q: Will there be a .NET Compact Framework 3.0 release with release of .NET Framework 3.0?
A: No. We are currently working on developing a version of the .NET Framework 3.0 functionality that will be supported on the Compact Framework, but shipping plans and included functionality have not been announced.


23. Q: What is the version number for the next version of the .NET Framework, codenamed “Orcas”?
A: We’re still planning the “Orcas” release, and so this number is not yet defined.


24. Q: What happens when I install the .NET Framework 3.0? How can I upgrade if I already have the .NET Framework 2.0 installed?
A: When you install the .NET Framework 3.0, the installer will check to see whether you already have the .NET Framework 2.0 (released version) installed. If not, the .NET Framework 3.0 installer will install the .NET Framework 2.0 for you, and then install the new .NET Framework 3.0 components. If you do have the .NET Framework 2.0 installed, the .NET Framework 3.0 installer will only install the new components of the .NET Framework 3.0.


25. Q: My organization went through the approval process of supporting the .NET Framework 2.0 in production. Do we need to go through the same process all over again for the .NET Framework 3.0? Do I need to do any application compatibility testing for my .NET Framework 2.0 applications?
A: Because the .NET Framework 3.0 only adds new components to the .NET Framework 2.0 without changing any of the components released in the .NET Framework 2.0, the applications you’ve built on the .NET Framework 2.0 will not be affected. You don’t need to do any additional testing for your .NET Framework 2.0 applications when you install the .NET Framework 3.0.


26. Q: Will the name change be reflected in any of the existing .NET Framework 2.0 APIs, assemblies, or namespaces?
A: There will be no changes to any of the existing .NET Framework 2.0 APIs, assemblies, or namespaces. The applications that you’ve built on .NET Framework 2.0 will continue to run on the .NET Framework 3.0 just as they have before.


27. Q: Which version of the Common Language Runtime (CLR) does the .NET Framework 3.0 use?
The .NET Framework 3.0 uses the 2.0 version of the CLR. With this release, the overall developer platform version has been decoupled from the core CLR engine version. We expect the lower level components of the .NET Framework such as the engine to change less than higher level APIs, and this decoupling helps retain customers’ investments in the technology.


28. Q: What is the .NET Framework 3.0 (formerly WinFX)?
A: The .NET Framework 3.0 is Microsoft’s managed code programming model. It is a superset of the .NET Framework 2.0, combining .NET Framework 2.0 components with new technologies for building applications that have visually stunning user experiences, seamless and secure communication, and the ability to model a range of business processes. In addition to the .NET Framework 2.0, it includes Windows Presentation Foundation (WPF), Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), and Windows CardSpace.


29. Q: What happens to the WinFX technologies?
A: The WinFX technologies will now be released under the name .NET Framework 3.0. There are no changes to the WinFX technologies or ship schedule — the same technologies you’re familiar with now simply have a new name.


30. Q: How does the .NET Framework 3.0 relate to the .NET Framework 2.0?
A: The .NET Framework 3.0 is an additive release to the .NET Framework 2.0. The .NET Framework 3.0 adds four new technologies to the .NET Framework 2.0: Windows Presentation Foundation (WPF), Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), and Windows CardSpace. There are no changes to the version of the .NET Framework 2.0 components included in the .NET Framework 3.0. This means that the millions of developers who use .NET today can use the skills they already have to start building .NET Framework 3.0 applications. It also means that applications that run on the .NET Framework 2.0 today will continue to run on the .NET Framework 3.0.


31. Is XAML only used for quick UI prototyping?
XAML will be used for production work, not just for prototyping. Specifically, localizing your application or ensuring that it is accessible—common for most applications today—will be a lot more work if you build your own user interface from code instead of using XAML


32. Will XAML replace other programming languages like C# and VB?
No. XAML complements procedural languages, much the same way HTML complements ECMAScript. You can very quickly declare how you want your user interface to look with XAML, then use a language like C# to define the business logic behind that user interface


33. Can XAML be used to develop both Web and client-server applications?
XAML is used as part of Windows Presentation Foundation to write smart client applications that take advantage of the power of the PC and benefit from all of the power of the CLR. For Windows Presentation Foundation applications, the logic runs on the client, unlike ASP.NET, which processes on the server. ASP.NET continues to be the answer to producing powerful Web applications that take advantage of the benefits of the CLR on the server


34. Why do we need XAML as a new way to create applications in .NET Framework 3.0 (formerly WinFX)?
The new application model in Windows Vista separates out declarative code (XAML) from procedural code (C#, VB.NET, J#, etc.). One major reason for using XAML is to bridge the gap between developing an application for Microsoft Windows and developing an application for the Web.XAML does not give you new functionality; it is just a declarative way to instantiate and initialize Microsoft .NET objects. XAML does, however, provide you with a way to solve problems such as:

When you write procedural code (C#, etc.) to create a number of controls, and compare that to the equivalent XAML, the XAML is more compact, less redundant, and less error-prone. Writing a designer for XAML will be a lot easier than writing a forms designer for C# or VB.NET, since the designer won’t have to do all that code parsing to figure out where to insert or change the setting of a property.

In the real world, many customers find requests coming in at the very last minute asking for changes to the user interface—a button needs to be moved or removed or the company logo needs to appear on every window. It is especially at the end of the development process, when you think your code is “frozen” and tested, that you’d rather not have to dive into the source code and start changing things. Who knows what subtle interaction you might break? With XAML, most—if not all—of the presentation layer is in its own file, thus providing a high degree of certainty that making a user interface change in the XAML will not break business logic code.

XAML enables professional graphic designers or user interface specialists to add beauty, style and grace to an application without modifying source files directly. Partitioning the user interface and the logic that drives it means each of us can get our job done without getting in each other’s way or having to understand the myriad details of one another’s tools.

XAML is considerably smaller than the equivalent C# code. Since there is less code, there are fewer opportunities for errors


35. What is XAML?
“XAML, Extensible Application Markup Language, is Microsoft’s XML-based language for creating a rich graphical user interface….XAML was introduced in 2003 as the language behind Windows Presentation Foundation, then known as Avalon.”


36. Why do we need XAML?
Well, OK, in the real world, there’s been a move towards declarative programming for a while. XAML is in some ways a logical successor to SGML-based markup languages like HTML and XML. Although of course XAML is an XML dialect it provides a way to bind presentational data (the declarative list of UI elements) with some or all of the code used with them. Now why, you might ask, would Microsoft be so bothered about that? Simply put, Microsoft needs to find new ways to exploit the processing power of the client as well as the server, if it is to continue selling operating systems for the next few decades. If true thin-client computing ever really got started, it would eviscerate the OS market. That’s what Google is aiming for, and it’s exactly the thing that Microsoft fears.XAML allows you to export processing to the client machine in a way that mere script doesn’t. In effect, you can stream the interface of an application, plus a portion (or even all) of its logic, over the wire using a protocol that’s open on most firewalls. You can stream XAML into the browser and get something roughly equivalent to ActiveX controls or Java applets (which exports .NET to the browser as Silverlight has done, something Microsoft has been planning for a while). Silverlight is the first fruit of this particular plan.However, don’t expect XAML-over-HTTP to stay within the browser for long. It’s a perfect way to provide desktop apps without installers, software-as-a-service, all the stuff Microsoft was supposed to be planning years back when people were still talking about Windows.NET - you didn’t think they just gave up on all that stuff, did you?Add to this the bare-metal hypervisor stuff they are developing - ‘Viridian’ for Windows Server 2008 will be a hobbled implementation of this, but there’s more coming, and it will likely be the core architecture of whatever ‘Vienna’ turns out to be - and you can see a model developing of (supposedly) safe, sandboxed, virtualised applications streamed from the net over fast connections, always up to date, running partially on the client and partially on the server, potentially replacing today’s stateless browser-based model of internet application.I doubt the reality will live up to the dream - it never does with Microsoft, any more than it does with anyone else - but that’s the reason they want you to buy into XAML in a nutshell.


37. What is XAML?
Transaction Authority Markup Language (XAML) is a vendor-neutral standard that enables the coordination and processing of online transactions in the rapidly emerging world of XML web services - the revolutionary new model of Internet-based computing that is now being adopted by all major systems and software vendors. XAML is intended to be a completely open standard for web-based business transactions.The standard defines a set of XML message formats and interaction models that web services can use in order to provide business-level transactions that span multiple parties across the Internet.

38. Why is XAML important for the delivery of e-commerce solutions?
As plug-and-play e-commerce emerges, businesses are mixing and matching web services from multiple partners to create sophisticated business web services. Because these “business webs” are comprised of aggregated calls to loosely coupled web services distributed across the web, and provided by multiple businesses, coordination among these web services is imperative, in order to carry out business-level transactions. There needs to be the notion of a transaction at the web service level, as well as a means by which software systems can coordinate the processing of calls to multiple web services to provide higher-level business transactions.

XAML will provide the standard mechanism to enable XML web services to participate in business transactions spanning multiple parties across the Web. Web services provide unprecedented business interoperability by enabling businesses to share processes and competencies on the web, creating a new era of business connectivity and dynamic, “plug-and-play” e-commerce.


39. What kind of applications will XAML enable?
As plug-and-play e-commerce emerges, businesses are mixing and matching web services from multiple partners to create sophisticated e-business applications. Because these “business webs” consist of loosely coupled web services distributed across the web from multiple businesses, coordination among these web services is imperative, in order to carry out business-level transactions. There needs to be the notion of a transaction at the web service level, as well as a means by which software systems can coordinate the processing of calls to multiple web services to provide higher-level business transactions.


40. Who is supporting XAML?
Bowstreet, Hewlett-Packard, IBM, Oracle and Sun are leading the XAML initiative to ensure distributed e-business transactions across the Internet. However, XAML is not owned by any one vendor. Instead, the standards proposal will be submitted to an appropriate open standards body to ensure that it remains an open industry standard in which any company and organization can participate.


41. How does XAML relate to other Web Service standards?
In order to understand how XAML relates to many of the existing standards, it is first necessary to understand what function each of these standards performs.When a web service is built, described, discovered and used, there are many elements that will be required. The combination of these many different elements is called a web services architecture. Some categories of these elements are: registries, business process modeling, negotiation, service description and web service transport protocols.

In order to use a web service, the existence of the service must be discovered. This discovery usually takes place in a “phone book” of web services known as a registry. Registries, such as UDDI and the ebXML registry/repository, contain human readable information that can be browsed and searched to find companies and their services.

Once a desired service is located, the terms of use can be reviewed and/or negotiated. The e-speak framework provides an elaborate negotiation mechanism. ebXML addresses the same issue through TPAML (Trading Partner Agreement Markup Language.)

Now that you know which service you need, you still have to know some additional things before you can use the web service; where is it located, what type of input it expects, what type of output it produces, which web service protocols it uses, etc. Service description languages, such as WSDL, provide a standard mechanism to outline all these details about a web service. Typically, for publicly available web services, their service descriptions are also made publicly available. The URI of the service description can be registered with a web service in a registry.

Once you know those details, you can start formulating a message to send to the service. However, some web services will require special packaging wrapped around the message, letting the web service know what to do with the message.

In this situation, an underlying web service transport protocol may need to be used, which can provide: an envelope which defines what is in a message and what program should deal with it2. specific information about how to exchange instances of application-defined data-types in a serialized format (You can think of this as how the programs agree on the format of a text-based XML file to send across the internet which contains information about a relational database or other complicated data structure within an application)3. a definition of a convention that can be used to represent remote procedure calls and responses.

XML-based web service transport protocols include: SOAP, XP (W3C XML Protocol) and ebXML Transport. Most of these web service transport protocols make use of existing protocols, such as: HTTP, SMTP, TCP, etc., to carry web service requests and responses across the internet.Another layer in the web services architecture is business process modeling. These languages define the business level descriptions of what needs to be accomplished. For example, they can describe a business scenario such as, “if a purchase order is received by my purchasing web service, the steps that need to be completed are: check inventory; if the inventory is available, ship product; if product ships, let accounting know, etc.” Business process modeling languages determine what needs to be completed and the necessary order of completion. However, they do not control nor monitor the underlying transactions themselves, where XAML is used to initiate, monitor, commit, cancel, retry, or initiate a compensating transaction.Consider this web services architecture example: A distributor of groceries needs to process an order from ACME grocery store. Included in the order is an order for 100lbs of fresh tomatoes. The grocery distributor needs to process this order. In order to fulfill this order the web services architecture will be used in a variety of ways.

The first requirement (even before the distributor gets the order) is to discover that Johnny’s Tomato Farm and Jimmy’s Refrigerated Transport provide the necessary business services. Both services are discovered via a registry; in this case, the distributor searched several different registries.

The second action is to make sure the distributor’s business web understands how to talk with each of these web services. This is done by downloading a service description for each of the two services. The registry entry indicated that Jimmy’s Refrigerated Transport is described as an e-speak service; whereas, Johnny’s Tomato Farm services are based solely on SOAP. An XML description is retrieved for the e-speak service and a WSDL document is retrieved for the SOAP service. Links to the service description documents were found in the registry entries.

An additional action must also happen before the order is placed. The business process model of a purchase order must be executed. 1)check to make sure that the person ordering is authorized to order; 2)check to make sure the ordering company has paid their last invoice; and 3)proceed to order the merchandise by ensuring that both services get managed using XAML. This entire business process is defined by an ebXML business process model. Some additional models may need to be set up…. If the item is perishable, then verify the transport availability, etc.

Now, the grocery distributor is ready for action and can accept a tomato order from ACME grocery store.

The order from ACME grocery store is taken via the distributor’s business web, and according to the business process model, the person is authorized and the finance department gives the approval. The transaction is begun on a business level. Because Tomatoes are marked as perishable, the “perishable food” model is initiated.

This model determines the business logic which states that transport must be arranged before tomatoes can be officially ordered. This logic is then used by the software that coordinates the calling of the relevant web services. The calling system prepares a message directed to a web service at Johnny’s Tomato Farm using SOAP, along with XAML to specify initiation of the transaction. In like manner, the system requests a web service at Jimmy’s Refrigerated Transport to supply the truck and driver, again using XAML to stage the request. Once both web services have responded confirming availability, the calling system interacts with the web services using XAML to facilitate the completion of the business process.


42. How does XAML relate to registries (UDDI)?
UDDI defines a registry for companies and their services. In a typical scenario using UDDI, a user/program would browse through categories (like in a yellow pages) for a particular service. Once the desired XML service is found, the ’service description’ for that service can be used to retrieve the details of calling that service (see service description languages section.) The ‘service description’ (WSDL, etc), defines the semantics of calling a specific service.
As with any other type of service, XAML services will be able to be registered and located within UDDI registries. UDDI can register XAML services.


43. How does XAML relate to service description languages (WSDL, XMI)?
Services description languages define the details that are needed to use a web service. Typically that includes: schema for the input, schema for the output, URI of the service, type of transport used (SOAP, XP, HTTP GET, …) The XAML group will consider providing binding information to service description languages.


44. How does XAML relate to business process modeling languages (ebXML business process, BPML)?
BPML covers dimensions of business process modeling that are specific to processes internal to the enterprise, including business rules, security roles, distributed transactions, and exception handling. XAML is targeted at coordinating business transactions that span web services crossing corporate boundaries.


45. How does XAML relate to XML-based web service transport protocols (XP, SOAP, ebXML Transport)?
XAML is designed for the coordination of transactional web services, not XML transportation and packaging issues. XAML will work with standard XML-based service transport protocols, including W3C XML Protocol (XP), SOAP and ebXML transport protocol.


46. How does XAML relate to ebXML?
ebXML is an OASIS/UN initiative to define all the layers in the web services stack. That includes categories such as registries, business process modeling, service descriptions, and transport/packaging/messaging. Please refer to the above explanation for details on how XAML relates to each of these categories.


47. How does XAML relate to e-speak?
E-speak is an open software platform designed for supporting the description, registration, and discovery of e-services, the ability to compose multiple e-services into higher-level e-services, the ability to negotiate among e-services, and the ability to manage e-service interactions. XAML will enhance the e-speak platform for the coordination and processing of online business transactions involving e-services. XAML provides e-speak with a standard set of XML message formats and interaction models for e-services to use to provide business level transactions that span across companies over the Internet.

48. How does XAML relate to BizTalk/.NET?
BizTalk/.Net is a Microsoft initiative to define all the layers in the web services stack. That includes four categories, registries(UDDI), business modeling languages (X-Lang), service descriptions (WSDL), and transport/packaging/messaging(SOAP). Please refer to the above explanation for details on how XAML relates to each of these categories.


49. What standards body will XAML be submitted to?
At this time, the XAML group has not determined which standards body is the most appropriate for XAML. However, as the specification evolves, the group will vote on an appropriate organization and submit a draft of the specification.


50. How does XAML support/extend existing transaction monitors?
XAML will enable web services to expose transactional semantics of the resources providing the services. Given that TP monitors commonly provide some of the management and coordination functions of these resources ‘behind the firewall” today, one of the goals of XAML is to enable TP monitors to participate and support the transactional semantics offered by web services. This includes passing of transaction ID’s through web service messages, and supporting the XAML web service operations of commit and cancel. At the level above individual web services, there is a new layer of software providing business-level transactions. This software makes calls to multiple web services, often spanning business boundaries. Given that XAML enables individual web services to support transactional semantics, there is also an opportunity for XAML to specify standard means for coordinating business-level transactions across collections of web services. To this end, one of the goals of XAML is to define message interfaces and interaction models that help software systems providing the business-level transactions to coordinate the interactions among web services. There is an opportunity to define XML interfaces and interaction models for a new breed of web services that would help software systems at the business transaction level. These services would provide brokering capabilities for managing the interactions among web services, for both web services supporting XAML, as well as web services that do not support XAML. This new breed of web services requires XML interfaces and interaction models that defines how software systems at the business transaction level would interact, to request assistance in shepharding a set of web services towards completion.


51. What is the relationship between XAML and other transaction protocols?
Classical online transaction management (OLTP) is the process of making simultaneous changes in several places “atomically” - that is, all the changes related to a transaction are made or none of the changes are made.
For example, within a single database connection, the DBMS provides some means of demarcating the beginning and end of a transaction. This demarcation ensures that changes to the database are made atomically. Sometimes, changes must be made atomically across multiple databases. For example, an insurance company might have to change both its claims information and its audit information at the same time, even though the audit information is in a separate database from the claims information. This multiple-database change would ensure that, during a later audit, the company would know which agent took the first report of the loss. In this case, the existing XA (Transaction Authority) protocol is useful. XA provides a standard mechanism for coordinating changes to multiple databases (called resource managers or RMs) as an atomic unit of work. Basically, the XA protocol asks each RM to vote on whether a commit will be successful. Once an RM has voted “yes,” it must be able to commit the open unit of work without failure. The commit occurs only if all RMs vote “yes.” This process of obtaining a vote, and then performing a commit, is called a “two-phase commit.”

Resource managers are most frequently databases, but they can also be message-oriented middleware. XA allows completely heterogeneous collections of RMs within a single transaction; for example a transaction can commit across DB/2 and Oracle at the same time. All major database vendors support XA.


52. What is the relationship between XAML and JTS/JTA?
J2EE includes support for distributed transactions through two specifications, Java Transaction API (JTA) and Java Transaction Service (JTS). JTA is a high level, implementation independent, protocol independent API that allows applications to access transactions. JTS specifies the implementation of a Transaction Manager which supports JTA and implements the Java mapping of the OMG Object Transaction Service (OTS) 1.1 specification using the IIOP protocol. The JTA API allows you to demarcate transactions in a manner that is independent of the transaction manager service or JTS.

While JTA provides an API for demarcating transactions in Java-based application logic, XAML provides an agreed upon protocol or a coordinated process of interaction among transactionally-aware web services over a defined transport. Given this, a web service internally implementing JTA could expose these transactional capabilities using XAML.


53. What is XAML?
(Extensible Application Markup Language; pronounced “zammel”)
XAML is a declarative XML-based language that defines objects and their properties in XML. XAML syntax focuses upon defining the UI (user interface) for the Windows Presentation Foundation (WPF) and is therefore separate from the application code behind it.
Although XAML is presently for use on the Windows platform, the WPF/E (Windows Presentation Foundation/Everywhere) initiative will eventually bring XAML to other platforms and devices.
XAML syntax describes objects, properties and their relationships to one another. Generic XAML syntax defines the relationship between objects and children. Properties can be set as attributes or by using ‘period notation’ to specify the object as a property of its parent.


54. Why Use XAML?
XAML allows the programmer to separate the user interface (UI) definition from the underlying business logic. XAML, since it is parsed, offers the possibility that a single UI definition can be used on different platforms XAML allows the user to edit the presentation layer (not necessarily directly, but with a simple tool) without requiring the usual development tools or programming knowledge


55. How Is XAML Used?
XAML is used for both web-based and client-based applications. Within those two segments, there are three camps regarding the usage of XAML:
Declaratively programming 2D and 3D vector graphics (VG)
Declaratively programming traditional (meaning no VG) UI’s and their controls (or widgets)
As a general declarative programming language for UI and non-UI constructs


.NET Framework
•Explain the features of .NET Framework
•Describe the .Net framework architecture. Explain the components of .Net framework, i.e. Common Language Runtime, Common type system, Type safety, Manage code execution, Side-by-side execution
Common language runtime (CLR)
•What is common language runtime? Explain the component of CLR, i.e. Class loader, MSIL, Code manager, Garbage collector, Security engine, Type checker, Thread support, Exception manager, Debug engine, COM marshaler, Base class library.
•How the Common Language Runtime Works
Execution of .Net application
•Explain how a .Net application is compiled and executed.
•Explain the components to ensure secure execution of code, i.e. Assembly loader, code verifier, Just-in-compiler (JIT).
•Explain the types of JIT compilers, i.e. Standard JIT, Pre JIT, Econo JIT.
Assembly
•Define Assembly. Explain the role that they play in the .Net framework.
•Describe the main components of an assembly, i.e. Manifest, Type Metadata, MSIL code and Resources
•What are the features provided by assemblies?
•How can we view content of an assembly?
•What are the types of assemblies? Private and shared assembly
•Describe the global assembly cache.
.Net Technologies
•Explain the technologies of .NET Framework 3.0.
- Windows Presentation Foundation (WPF)
- Windows communication Foundation
- Windows workflow Foundation
- Windows Cardspace
Common Type system (CTS)
•Explain C# CTS
•Explain the collection of CTS types defined by .NET Framework, i.e. classes, structs, enums, interfaces, delegates
•What are type categories defined by CTS? Explain them
•Benefit of value types.
•Value types vs. reference types
•What are the type conversions in C#? Explain them
•C# 3.0 includes a new feature called an implicitly typed variable. Explain it.
.Net base class library
•What is .Net base class library?
•Explain the difference between value types and reference types.
Configuration and security
•Describe the configuration files in .Net. What are different types of configuration files in .Net framework? – Machine configuration, Machine .config file, Application configuration file, security configuration file.
Boxing and unboxing
•.NET defines value types and reference types as two major groups of data types. What are they? Explain them with example.
•Advantages amd Disadvantage of Boxing.
C# Methods
•Depict code to show c# methods with explanation.
•Explain the concept of ref and out parameters with an example.
•C# supports the use of parameter arrays and params keyword. Explain with an example
•Using C#.Net, create a new method using input and output parameters.
•Third type of comment supported by C# is a documentation comment. What is that?
Access Level
•Explain the difference between public, internal and private access levels.
•Explain the use of static members with example using C#.NET
C# user defined data type
•Define enum. Provide an example to explain it
•Define struct. Provide an example to explain it
C# Array
•Explain Single dimensional arrays. Show it in an example
•Explain Multidimensional arrays. Show it in an example
•Explain Jagged Array. Show it in an example
•Show how to declare a 4 by 5, two-dimensional array of ints.
•Show how to declare a jagged two-dimensional int array in which the first dimension is 5.
•Show how to initialize a one-dimensional int array with the values 1 through 5.
C# Object oriented programming
•What is an object?
•Characteristics of an object, i.e. state, behavior, identity, responsibility
•Explain the major pillar of object oriented system, i.e. Abstraction, Encapsulation and Inheritance
•Explain polymorphism.
Forms
•Explain the form methods that are used to control their lifetime. Form.Show, Form.ShowDialog, Form.Activate, Form.Hide, Form.Close.
•What are method’s events? Explain each of them, i.e. load, activate/deactivate,closing,closed.
Controls and components
•Explain how to set the control tab order in C#.Net.
•What is docking and anchoring. Explain their use with controls.
•Explain how to add controls dynamically to the form using C#.NET.
•What are Extender provider components? Explain how to use an extender provider in the project.
•Explain how to add a control to a form at runtime.
Menus
•What are MainMenu components? Explain its role.
•What is ContentMenu component?
•Write code using C#.NET for the following
Enable or disable a menu item.
Create shortcut keys for menu item.
Make menu items invisible.
Add items to a menu.
Clone a menu
C# class
•What is a class?
•What are data members and function members of a C# class?
•What are the access modifiers of the members of a class? public, private, protected, internal and protected internal
•What is a constructor?
•Explain the features of constructors.
•What is a destructor? Features of destructor.
•What are indexers?
•Properties vs. indexers
•Static methods of class. Example
•non-static methods of class - Example
•Static vs. non static methods of a class
Method overloading
•Define Method overloading. Provide an example and explain
•Define Operator overloading. Provide an example and explain
•What are operators that cannot be overloaded?
•What are rules needs to be followed while overloading operators?
Exceptions
•Define Exceptions.
•Explain System.Exception class in C#.
•Explain the categories of exceptions that exist under the base class Exception, i.e. SystemException class, ApplicationException.
•Explain Exception handling in C# with an example.
•Define some of the common Exception classes in C#.
Inheritance in C#
•Define Inheritance. Provide an example to show implemantation of inheritance in C#.
•What are the access specifiers in base class? i.e. private, public, protected, internal and protected internal
Polymorphism in C#
•Define Polymorphism.
•How do we achieve Polymorphism in C#? i.e. virtual function and inheritance
•Define Shadowing in C#. Provide an example to show implemantation of Shadowing in C#
•Sealed class. Provide an example to show implemantation of Sealed class in C#
•Concrete class. Provide an example to show implemantation of Concrete class in C#
•Abstract class. Provide an example to show implemantation of Abstract class in C#
•Interface. Provide an example to show implemantation of Interface in C#
•Features of interfaces.
•Abstract class vs. interface
•Cloning in C#.
•Concept of shallow copy or a deep copy
C# collection
•Define collections in C#.NET.
•Explain the types of collections - Generic collection and non-generic collection.
•Define collection interfaces.
•Describe some of the collection interfaces
IEnumeration interface
IEnumerable
IList
IComparable
IComparer
IDictionary
•Advantages and disadvantages of Generic and non-generic classes
C# Delegates
•Define Delegates
•Explain the types of Delegates - unicast delegates and multicast delegates
•Explain the steps in defining and using delegates in C#.
•Single vs. Multicast Delegates
•What is Asynchronous Delegates? Provide an example to show implemantation of Asynchronous Delegates in C#
•Define Events. Describe how to implemant of an Event in C#.
•Explain with an example of working of Eventhandler Delegates
•Covariance and contravariance are used to enhance the Delegate behavior. Explain it
C# garbage collector
•Automatic memory management in .NET is done by Garbage Collector (GC). Explain
•Brief explanation of some of the garbage collector's methods
Collect()
GetGeneration()
MaxGeneration
WaitForPendingFinalizers()
ReRegisterForFinalize()
SuppressFinalize
•Explain implicit resource management using Finalize () method
•Explain explicit resource management using Dispose method.
C# Reflection
•Explain Reflection C#.
•Define the situation in which Reflection is useful.
•Can you explain how to use different classes in system.Reflection namespace to get the types defined in the assembly?
Input/Output in C#
•Overview of the Stream based I/O in C#.
•Explain the types of Streams.
•Explain how to access files paths by using the Path class.
Serialization in C#
•Define serialization and deserialization.
•Describe how to serialize and deserialize obect by using BinaryFormatter and SoapFormatter class.
•Describe how to Serialize and deserialize objects by using xmlSerializer class.
•Explain the Types of Serialization.
XML in C#
•What is XML? Characteristics of XML. Benefit of XML
•What are the different components of XML and explain their usage.
•Explain the core .Net XML classes.
•Explaination with an example the uses of XMLReader and XMLwriter for accessinbg and writing XML data.
ADO.NET in C#
•Features of ADO.NET
•Explain the components that help in data access and data manipulation in ADO.NET - .Net data provider and Dataset
•Explain different .NET data provider
ODBC data provider
OLEDb data provider
Oracle data provider
SQL Data Provider
•Differentiate between connected and disconnected environment.
•Describe how to connect to SQLServer database using connection object.
•Describe how to create and use command object to query the database.
•Describe how to use a DataReader object to read the data fetched from the database.
•Describe how to call a stored procedure created in SQL server database to perform insert, update or delete operations.
C# COM interoperability
•Managed and unmanaged code
•CLR provides two mechanisms for interoperation with unmanaged code, i.e. Platform invocation services, COM interoperability. Explain them
•COM components vs. .NET components.
C# Multithreading
•Define multitasking and multi-threading
•Explain different thread states in the life cycle of a thread
•Write a simple multithreaded application
C# web services
•What is a web services?
•Features of web services
•What are the building blocks of web services?
•Define functionality of UDDI, DISCO, WSDL and SOAP.
•Define a web method.
•Write a simple code to create a simple web services
•Explain the concept of SOAP
C# deploying .NET application
•Describe deployment process in .NET
•What are the deployment project templates provided by VS.NET?
•Describe how to implement XCOPY deployment.
LINQ
•What does LINQ stand for? In general terms, what is its purpose?
•As it relates to LINQ, what interface must a data source implement?
•What are the query keywords that begin query clauses?
•What query keyword is used to filter a sequence? Use it to rewrite your answer to question 5 so that it returns only those MyData objects whose Height property is less than 100.
•What query keyword orders a sequence? Using your answer for question 6, sort the results into descending order based on the Height property.
•What query keyword groups the result of a query organized into sequences? (In other words, what keyword returns a sequence of sequences?) Show its general form.
•What keyword joins two sequences? Show its general form in the context of a from clause.
•When using select or group, what keyword creates a continuation?
•What keyword creates a variable that holds a value?
•Show how to create an instance of an anonymous type that has two string properties called Title and Author.
•What is the lambda operator? A lambda expression is one form of anonymous function. True or False?
•What is the query method that corresponds to the where keyword?
•What is an extension method? How must the first parameter be declared?
•Why are extension methods important to LINQ?

http://careerride.com/CSharp-Interview-Questions.aspx

A very good link for enabling WCF Windows Authentication:
http://www.padel.ro/post/wcf-and-windows-authentication-.net-4.0-style/