Wednesday, September 1, 2010

WebServices Interview Questions

What is Web Service?


Web Service allows Distributed Applications to share Business Logic over Internet


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

SOAP (Simple Object Access Protocol) is the preferred protocol.


True or False: A Web service can only be written in .NET?

False

What does WSDL stand for?

Web Services Description Language.


Where on the Internet would you look for Web services?

http://www.uddi.org


True or False: To test a Web service you must create a Windows application or Web application to consume this service?

False, the web service comes with a test page and it provides HTTP-GET method to test.

ASP.NET 3.5 Inteview Questions

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


Response.Output.Write() allows you to write formatted output.

What methods are fired during the page load?

Init() - when the page is instantiated

Load() - when the page is loaded into server memory

PreRender() - the brief moment before the page is displayed to the user as HTML

Unload() - when page finishes loading.


When during the page processing cycle is ViewState available?

After the Init() and before the Page_Load(), or OnLoad() for a control.


What namespace does the Web page belong in the .NET Framework class hierarchy?

System.Web.UI.Page


Where do you store the information about the user’s locale?

CodeBehind is relevant to Visual Studio.NET only.

What’s the difference between Codebehind="MyCode.aspx.cs" andSrc="MyCode.aspx.cs"?

CodeBehind is relevant to Visual Studio.NET only.

What is the Global.asax used for?

The Global.asax (including the Global.asax.cs file) is used to implement application and session level events.

What are the Application_Start and Session_Start subroutines used for?

This is where you can set the specific variables for the Application and Session objects.


Whats an assembly?

Assemblies are the building blocks of the .NET framework;

Whats MSIL, and why should my developers need an appreciation of it if at all?

MSIL is the Microsoft Intermediate Language. All .NET compatible languages will get converted to MSIL. MSIL also allows the .NET Framework to JIT compile the assembly on the installed computer.



Which method do you invoke on the DataAdapter control to load your generated dataset with data?

The Fill() method.


Can you edit data in the Repeater control?

No, it just reads the information from its data source.



Which template must you provide, in order to display data in a Repeater control?

ItemTemplate.
Name two properties common in every validation control?

ControlToValidate property and Text property.
What base class do all Web Forms inherit from?

The Page class.

What is the difference between Server.Transfer and Response.Redirect? Why would I choose one over the other?

Server.Transfer transfers page processing from one page directly to the next page without making a round-trip back to the client's browser. This provides a faster response with a little less overhead on the server. Server.Transfer does not update the clients url history list or current url. Response.Redirect is used to redirect the user's browser to another page or site. This performas a trip back to the client where the client's browser is redirected to the new page. The user's browser history list is updated to reflect the new address

What is ViewState?

ViewState allows the state of objects (serializable) to be stored in a hidden field on the page. ViewState is transported to the client and back to the server, and is not stored on the server or any other external source. ViewState is used the retain the state of server-side objects between postabacks.

What is the lifespan for items stored in ViewState?

Item stored in ViewState exist for the life of the current page. This includes postbacks (to the same page).

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

It allows the page to save the users input on a form across postbacks. It saves the server-side values for a given control into ViewState, which is stored as a hidden value on the page before sending the page to the clients browser. When the page is posted back to the server the server control is recreated with the state stored in viewstate.

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

ASP.NET provides In-Process and Out-of-Process state management. In-Process stores the session in memory on the web server. This requires the a "sticky-server" (or no load-balancing) so that the user is always reconnected to the same web server. Out-of-Process Session state management stores data in an external data source. The external data source may be either a SQL Server or a State Server service. Out-of-Process state management requires that all objects stored in session are serializable.

Windows Communication Foundation [WCF] - Interview questions

What is Windows Communication Foundation, WCF?


WCF helps in building applications to communicate with each other. It is a framework that helps in managing distributed computing.


What are the components of WCF?


Components of WCF Contracts and descriptions: - Describes different features of messaging. The features are described by Data contract, message contract, service contract and policy and binding.


What is the difference between WCF and Web services?


WCF has a variety of distributed programming infrastructures. WCF offers more flexibility and portability.


What is duplex contracts in WCF?


WCF allows duplex messaging pattern. Services can communicate with client through a callback. Duplex messaging in WCF.


What are different binding supported by WCF?


Different bindings


Built- in bindings and custom bindings. When the built in or system provided bindings are not suited for the requirement.


How do we use MSMQ binding in WCF?


Message queue allows applications running at different times to send and read messages from queues. WCF uses transactional queue to capture messages, delivered and stored.


Explain volatile queues and Dead letter queues.


WCF also uses non transactional queues for storing messages. Such queues are volatile in nature. They are stored in memory and not used in transactions. On shutting down the machine, the queue is lost.


What are the various ways of hosting a WCF service?


Ways of hosting WCF Service: Self hosting: - The service code is embedded within the application code. An end point for the service is defined and an instance of SeriveHost is created.


Explain transactions in WCF.


Transactions in WCF allow several components to concurrently participate in an operation.


What are the various programming approaches for WCF?


Programming approaches for WCF: Imperative: - Different programming languages can be sued for implementing service logic.


What are the advantages of hosting WCF services in IIS?


Advantages of hosting WCF services in IIS : Provides process activation and recycling ability thereby increasing reliability


What are different isolation levels provided in WCF?


The different isolation levels: READ UNCOMMITTED: - An uncommitted transaction can be read. This transaction can be rolled back later .

Language Integrated Query (LINQ) Training

LINQ Training Overview
LINQ training classes teaches attendees how to use Language Integrated Query to query arrays, enumberable classes, relational databases, and a wide variety of other relational and object-based data sources.
Prerequisites
      Basic Understanding Knowledge of .NET 2.0 or 3.5 using C# or VB.NET
LINQ Training Objectives
       Master new features in the latest releases of C# and/or VB.NET
       Learn the fundamentals of the LINQ syntax and how to build queries in LINQ
       Discover how to use LINQ to query relational databases
       Understand how to use LINQ to query XML data sources
LINQ Training Outline
1.Introduction to LINQ
  • Motivate the Need for LINQ
  • Learn about the Various LINQ Providers
  • Investigate Simple LINQ to Objects, LINQ to SQL, and LINQ to XML Samples
2.Language Enhancements for LINQ
  • Investigate the New Language Features Required by LINQ
  • Learn about Impllicit Type Declaration
  • Use Object Initialization
  • Work with Lambda Expressions
  • Create and Use Extension Methods
  • Select Multiple Columns Using Anonymous Types
3.LINQ to Objects
  •  Learn Various Techniques for Using LINQ to Query Collections of In-Memory Objects
  • Use LINQ with Arrays, Generic Lists, Generic Dictionaries, Strings, and Other Non-Generic Collections
  • Work with Examples Using Many of the System.Linq.Enumerable Extension Methods, and Compare these Methods to LINQ Keywords
4.LINQ to SQL
  • Learn How to Map a Data Model to an Object Model
  • Lean Various Techniques for Using LINQ to SQL to Query Data in a SQL Server Database
  • Explore How to Modify Data and Save Changes
  • See How to Use Stored Procedures to Modify Data
5.Advanced LINQ to SQL
  •   Explore Advanced Features of LINQ to SQL
  • Explore Using LINQ to SQL in a Windows Application
  • Explore Using LINQ to SQL in a Web Application
  • LINQ to DataSets
  • Learn Various Techniques for Using LINQ to DataSet to Query Data in a DataSet
  • See How to Use DataViews with the Results of a LINQ to DataSet Query
  • Explore How to Bind the Results of a LINQ to DataSet Query to Windows Forms Controls
6. LINQ to XML
  • Create XML Content Using Classes in the System.Xml.LINQ Namespace
  • Search Content Using XPath Expressions with the LINQ-Based API
  • Validate XML Content Using the LINQ-Based API
  • Query XML Content Using LINQ to XML
  • Transform XML Content Using LINQ to XML
7.LINQ to Entities
  • Understand the Relationship Between LINQ to Entities and the Entity Framework
  • Learn How to Map a Data Model to an Entity Data Model
  • Learn Various Techniques for Using LINQ to Entities to Query Data in a Database
  • Explore How to Modfiy Data and Save Changes
  • See How to Use Stored Procedures to Modify Data

Web Services Using C# and ASP.NET Training

Training Outline

1.What Are Web Services?

  • Introduction to Distributed Computing
  • Network Latency
  • Object State and Scalability
  • Interoperability
  • SOAP
  • WSDL
  • UDDI
  • Web Service Business Models
  • Service Oriented Architecture (SOA)
  • ASP.NET Web Services
  • Web Service Enhancements (WSE)
  • Windows Communications Framework (WCF)
2.Web Services Fundamentals


  • Creating a Web Service Using ASP.NET
  • Deploying a Web Service Using IIS
  • Testing a Web Service
  • HTTP
  • XML
  • SOAP 1.1 and SOAP 1.2
  • Web Service Clients
  • WSDL
3.Developing ASP.NET Web Services


  • Using Visual Studio 2005 to Develop Web Services
  • Visual Web Developer
  • Using ASP.NET Development Server
  • An Overview of the Web Services Namespaces
  • Deriving from the WebService Class
  • @Webservice Attribute
  • Adding a WebMethod to Web Services
  • Debugging Web Services
  • WS-I Basic Profile
  • ASP.NET Configuration
4.Web Service Clients


  • Web Service Proxies
  • Web Services Description Language Tool (Wsdl.exe)
  • Understanding the Proxy Code
  • Creating a Proxy with Visual Studio 2005
  • Returning Complex User-Defined Data Types
  • Writing a Client for the Google Search API
5.ASP.NET Web Services Programming Model


  • Asynchronous Programming in Web Services
  • Asynchronous Events in .NET 2.0
  • Managing State in ASP.NET Web Services
  • Transactions in ASP.NET Web Services
  • Caching in ASP.NET Web Services
6.XML Serialization
  • XmlSerializer
  • What Is Not Serialized
  •  Writing and Reading XML
  • Customizing XML Serialization
  • XML Schema and XSD
  • Creating Classes from Schemas
  • XML Serialization and Web Services
7.More about SOAP


  • The Structure of SOAP Messages
  • Using SOAP Headers
  • SOAP Faults
  • Document and RPC Style Messaging
  • Literal and Encoded Use
  • Customizing SOAP with Attributes
  • Using SOAP 1.2
8.More about WSDL


  • The Need for Service Description
  • An IDL for Web Services
  • WSDL Namespaces
  • The WSDL Description Model
  • WSDL Descriptors as Schema
  • Message Description
  • Messaging Scenarios
  • Operations: Input, Output, and Fault
  • Messages
  • Service Description
  • Extending WSDL
  • .NET WSDL Classes
  • WSDL First!
9.Data Access with Web Services


  • Multiple-Project Solutions in Visual Studio
  • Multiple-Tier Data Access
  • Data Access Using ADO.NET 2.0
  • A Data Access Web Service
  • Data Binding with Windows Forms
  • Using Typed DataSets
  • Binding to a Web Service
10.WSE 3.0 and Web Services Security


  • Web Service Enhancements (WSE)
  • Windows Communications Framework (Indigo)
  • WSE Architecture
  • A WSE-Enabled Web Service
  • WSE Settings 3.0 Tool
  • WSE Message Tracing
  • A WSE-Enabled Client
  • Web Services Security
  • Server Authentication
  • X.509 Certificates
  • Policy Files
  • User Name Authentication






Windows Communication Foundation [ WCF ] Using C# Training

 WCF with C# Training Overview


Windows Communication Foundation (WCF) training teaches Microsoft's new framework for building distributed systems. It unifies and builds on the diverse set of existing distribution mechanisms, which include ASP.NET Web services and .NET Remoting. WCF enables developers to produce highly configurable, secure, reliable and transactional services using a single simplified programming model. And since WCF supports the WS-* series of Web service standards, it enables simple interoperation with other platforms and technologies.


WCF with C# Training Prerequisites

Students should have understanding knowledge of building .NET applications with C#. Knowledge of building distributed systems Web services will also be an advantage.


WCF with C# Training Objectives


All attendees will learn how to:

  • Build and call WCF services.
  • Host WCF services using Web servers and managed applications.
  • Configure service endpoints in code and in configuration files.
  • Use the WCF-supplied bindings as well as create custom bindings.
  • Manage service and data contracts.
  • Handle exceptions in WCF services.
  • Monitor and diagnose WCF services at runtime.
  • Implement three different message exchange patterns.
  • Maintain state in WCF services.
  • Add transactions support to a WCF services.
  • Authenticate callers of a service and restrict their access based on roles.
  • Expose a workflow as a WCF service and call a WCF service from within a workflow.
  • Build WCF services that support REST.
  • Build WCF services that generate RSS and Atom feeds.
WCF with C# Training Outline
   
1. Introduction to WCF
  • Review the Challenges of Building Distributed Applications
  • Examine the Concept of Service Oriented Application
  • See a High Level Overview of Windows Communication Foundation
  • Building and Host your First WCF Service
2.Hosting and Calling WCF Services
  • Understand how to Host a WCF Service
  • Understand how Clients Communicate with Services
  • See how to Host and Call a Service using Multiple Bindings
  • See how to Configure Endpoint in Code and in Configuration Files
3.Bindings and Contracts
  • Understand how to Work with Bindings
  • Explore how to Create Service and Data Contracts
  • See the Implications of Modifying Service and Data Contracts
4.Exceptions, Diagnostics and Message Patterns
  • Learn how to Handle Exceptions in WCF Services
  • See Techniques for Diagnosing Services
  • Explore One-Way and Duplex Communication
5.Sessions and Transactions
  • See how to use Sessions to Maintain State in WCF Services
  • Explore Options for Controlling the Lifetime of a Service Instance
  • Learn how to Add Transactions Support to a WCF Service
6.WCF Security

  • Explore the Basics of WCF Security
  • See how to Authenticate Callers of a Service
  • See how to Authorize Callers Based on Roles
7.Workflow Services
  • Learn how to Expose a Workflow as a WCF Service
  • See how to Call a WCF Service from a Workflow
  • Understand how to Build a Stateful Workflow Service
8.RESTful Services and Syndication
  • Explore how to Build WCF Services that Support Representational State Transfer (REST)
  • See how to Build WCF Services that Create RSS and Atom Feeds