WCF related Interview Questions

WCF is a programming framework used to build applicaions that inter-communicate. It is the part of the .NET Framework dedicated to communications. 
Go here  for more about WCF.

1.) How does Windows Communication Foundation address Service Oriented Architecture (SOA)?
WCF is the first programming model built from the ground up to provide implicit service-oriented application development, enabling developers to work autonomously and build applications that are more version independent, thereby increasing application resilience to change.
2.) How to deal with operation overloading while exposing the WCF services?
By default overload operations  are not supported in WSDL based
 operation. However by using Name property of OperationContract attribute, we can deal with operation overloading scenario. 

[ServiceContract] 
interface Isum 

[OperationContract(Name = "MultiplyInt")] 
int Multiply(int arg1,int arg2); 

[OperationContract(Name = "MultiplyDouble")] 
double Multiply(double arg1,double arg2); 



Notice that both method name in the above interface is same (Add), however the Name property of the OperationContract is different. In this case client proxy will have two methods with different name MultiplyInt and MultiplyDouble.

3.) Is Windows Communication Foundation going to interoperate with my existing applications?
The current plan is for Windows Communication Foundation to provide wire-level interoperability with WSE3, System.Messaging, .NET Enterprise Services, and ASMX applications. With minimal or no changes to code, applications built with these technologies will be able to call Windows Communication Foundation services and be callable by Windows Communication Foundation services.

4.) How to configure Reliability while communicating with WCF Services?
Reliability can be configured in the client config file by adding reliableSession under binding tag.
Reliability is supported by following bindings only:
NetTcpBinding
WSHttpBindingWSFederationHttpBinding
WSDualHttpBinding

5.) Will Windows Communication Foundation applications interoperate with Web services built with other technologi
es?
Yes. By default,services built with WCF will communicate with other services based on the interoperable Web services specifications. This means that WCF services will communicate with any application built on an infrastructure that also conforms to these standards. Microsoft is deeply committed to p
latform interoperability and is an active member of key standards organizations defining the latest Web services standards. 

6.) How to set the timeout property for the WCF Service client call?
The timeout property can be set for the WCF Service client call using binding tag. If no timeout has been specified, the default is considered as 1 minute.

7.) What are the core components of an Windows Communication Foundation service?
A host environment—an application domain and process—in which the service runs;
A service class, implemented in C# or VB.NET or another CLR-based language that implements one or more methods;
One or more endpoints that allow clients to access the service.
8.) What are different elements of WCF Srevices Client configuration file?
WCF Services client configuration file contains endpoint, address, binding and contract. 

Silverlight Interview Materials

Microsoft Silverlight is a cross-browser, cross-platform, and cross-device plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. By using Silverlight's support for .NET, High Definition video, cost-effective advanced streaming, unparalleled high-resolution interactivity with Deep Zoom technology, and controls, businesses can reach out to new markets across the Web, desktop, and devices(Fig. source : MS Site).
Silverlight provides a retained mode graphics system similar to WPF and integrates multimedia, graphics, animations and interactivity into a single runtime environment. In Silverlight applications, user interfaces are declared in XAML and programmed using a subset of the .Net framework. XAML can be used for making up the vector graphics and animations.

1.) Is Silverlight free?
Yes, Microsoft has made the Silverlight browser plug-in freely available for all supported platforms and browsers.

2.)What is the long-term goal or vision for Silverlight?
Microsoft Silverlight is a cross-browser, cross-platform, and cross-device plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. Silverlight offers a flexible programming model that supports AJAX, VB, C#, IronPython, and IronRuby, and integrates with existing Web applications. By using Expression Studio and Visual Studio, designers and developers can collaborate more effectively using the skills they have today to light up the Web of tomorrow. By leveraging Silverlight's support for .NET, High Definition video, cost-effective advanced streaming, unparalleled high-resolution interactivity with Deep Zoom technology, and controls, businesses can reach out to new markets across the Web, desktop, and devices.

3.) When would a customer use Silverlight instead of ASP.NET AJAX?
Silverlight integrates with existing Web applications, including ASP.NET AJAX applications. Consequently, ASP.NET AJAX and Silverlight are designed to be complementary technologies. In the broader sense, Silverlight can talk to any AJAX application, both client-side and server-side. ASP.NET AJAX can additionally be used to control Silverlight-based visualization of data or delivery of rich experiences. Examples might include mapping applications or video playback with rich presentation.

4.) Will Silverlight support live streaming events as well as downloading media?
Yes. Silverlight together with Windows Media Services enable live streaming experiences.

5.) When would a customer use Silverlight versus Windows Presentation Foundation? Is Silverlight for a certain type of application?
For ASP.NET-based Web applications, Silverlight provides a rich UI front-end that, with a consistent programming model, adds support for richer interactivity, media, and audio.
For Microsoft SharePoint–based content, Silverlight offers the ability to create rich Web parts. For Windows Live services, Silverlight offers the ability to consume services and APIs more effectively.

6.) Will Silverlight work with my new or existing Windows Media services platform for streaming?
Silverlight takes advantage of Windows Server features for streaming.

7.) What features are missing from Silverlight presentation markup that will be supported in the Windows Presentation Foundation?
Microsoft recommends the Windows Presentation Foundation for building rich immersive applications and experiences that can take full advantage of the Windows platform, including UI, Media, offline communication, OS integration, Office integration, peripheral access, Document support and more. Silverlight will be used for broad reach interactive media content and browser-based rich interactive and high-performance applications and experiences.

8.) Is Silverlight a new media player?
No. Silverlight is a cross-browser, cross-platform plug-in for delivering media experiences and RIAs. It is not a desktop application or stand-alone media player.
(I had attended Silverlight session on MIX09 conference in Las Vegas on 3/17/09)

ASP.NET Master Pages

A master page can be created to hold those page elements that represent the common look and feel of a website. Once the common content is placed in the master page, the content pages (child pages) can inherit content from the master pages.
When a new content page is created, the developer simply needs to link it to an existing master page. When that content page is rendered, the content page and its associated master page will be "merged" at runtime. The resulting markup will contain all of the elements from the master page as well as those elements defined in the content page.The master page contains the form tags and content pages derived from that master page does not have form tag.


1.)What is Master Page in ASP.NET?
A Master page offers a template for one or more web forms. It defines placeholders for the content, which can be overridden by the content pages. The content pages contains only content. When users request the content page, ASP.NET merges the layout of the master page with the content of the content page and produce output.

2.) Define Multiple Master Page.

In ASP.NET, you can have multiple master pages each for a different purpose. You can provide users several layout options using Multiple Master Page. You can define Master Page at multiple places in the web application.


You can specify page-level using the @Page dierective.
You can specify using the Web.config.

3.)
Advantages of using Master Page in ASP.NET

Master pages enables consistent and standardized layout to the website.
You can make layout changes of the site in the master page instead of making change in the pages.
It is very easy to implement. It also reduces the Work.


4.) 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.
5.) How do you attach an exisiting page to a Master page?
By using the MasterPageFile attribute in the @Page directive and removing some markup.
6.) 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" %>
7.) 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.