April 11, 2011

what is endpoint in wcf

All communication with a Windows Communication Foundation (WCF) service occurs through the endpoints of the service. Endpoints provide clients access to the functionality offered by a WCF service.
Each endpoint consists of four properties:
  • An address that indicates where the endpoint can be found.

  • A binding that specifies how a client can communicate with the endpoint.

  • A contract that identifies the operations available.

  • A set of behaviors that specify local implementation details of the endpoint.

This topic discusses this endpoint structure and explains how it is represented in the WCF object model.

The Structure of an Endpoint

Each endpoint consists of the following:
  • Address: The address uniquely identifies the endpoint and tells potential consumers of the service where it is located. It is represented in the WCF object model by the EndpointAddress class. An EndpointAddress class contains:

    • A Uri property, which represents the address of the service.

    • An Identity property, which represents the security identity of the service and a collection of optional message headers. The optional message headers are used to provide additional and more detailed addressing information to identify or interact with the endpoint.

    For more information, see Specifying an Endpoint Address.

  • Binding: The binding specifies how to communicate with the endpoint. This includes:

    • The transport protocol to use (for example, TCP or HTTP).

    • The encoding to use for the messages (for example, text or binary).

    • The necessary security requirements (for example, SSL or SOAP message security).

    For more information, see Windows Communication Foundation Bindings Overview. A binding is represented in the WCF object model by the abstract base class Binding. For most scenarios, users can use one of the system-provided bindings. For more information, see System-Provided Bindings.

  • Contracts: The contract outlines what functionality the endpoint exposes to the client. A contract specifies:

    • What operations can be called by a client.

    • The form of the message.

    • The type of input parameters or data required to call the operation.

    • What type of processing or response message the client can expect.

    For more information about defining a contract, see Designing Service Contracts.

  • Behaviors: You can use endpoint behaviors to customize the local behavior of the service endpoint. Endpoint behaviors achieve this by participating in the process of building a WCF runtime. An example of an endpoint behavior is the ListenUri property, which allows you to specify a different listening address than the SOAP or Web Services Description Language (WSDL) address. For more information, see ClientViaBehavior.

Go to question list 

Components of WCF

The main components of WCF are

1. Service class

2. Hosting environment
3. End point 


Go to question list 

Difference between web services and WCF

Windows Communication Foundation (WCF) has an ASP.NET compatibility mode option to enable WCF applications to be programmed and configured like ASP.NET Web services, and mimic their behavior.

Major Difference is That Web Services Use XmlSerializer But WCF Uses
DataContractSerializer which is better in Performance as Compared to XmlSerializer.
Key issues with XmlSerializer to serialize .NET types to XML

* Only Public fields or Properties of .NET types can be translated into XML.
* Only the classes which implement IEnumerable interface.
* Classes that implement the IDictionary interface, such as Hash table can not be serialized.

Important difference between DataContractSerializer and XMLSerializer.

* A practical benefit of the design of the DataContractSerializer is better performance over Xmlserializer.
* XML Serialization does not indicate the which fields or properties of the type are serialized into XML where as DataCotratSerializer Explicitly shows the which fields or properties are serialized into XML.
* The DataContractSerializer can translate the HashTable into XML.


Go to question list 

March 29, 2011

Capgemini Interview Questions WCF, Asp.net, C#.net, Sql server

Windows Communication Foundation (WCF) questions:
1. Difference between web services and WCF?
2. Components of WCF?
3. What is End Point?
4. WCF Hosting types?
5. How many protocols can be used to access WCF?
6. What is WCF Binding?
7. What is WCF contract?
8. What are the transfer modes available?
Oops questions:
1. Features of Oops?
2. What do you understand by polymorphism and message passing?
3. Difference between overloading and overwriting?
C#.net questions
1. What is the use of private constructor and why to make constructor as private?
2. How to erase unmanaged code objects from memory?
3. What is the use of finalize() method?
4. Why to use GC.Collect() method?
5. How many catch blocks can be created after try block?
6. Can we put try without catch?
7. What is delegate?
8. What are anonymous methods?
9. What will happen if I call 5 times a single anonymous method?
10. What is shared classes?
ASP.net questions
1. What is impersonation?
2. How many securities provided by asp.net?
3. What is assembly?
4. Difference between assembly and namespaces?
5. What is strong name?
6. What do you meant by late binding?
Sql Server
1. Tell me types of logs generated by sql server?
2. How to perform exception handling in sql server?
3. If I had a before update trigger and I am updating trigger and table in same time what will happen?
4. Single line statement for copy the structure of table to another table?

March 4, 2011

ASP.NET MVC

Model: The model contains the core information for an application. This includes the data and validation rules as well as data access and aggregation logic.
View: The view encapsulates the presentation of the application, and in ASP.NET this is typically the HTML markup.
Controller: The controller contains the control-flow logic. It interacts with the Model and Views to control the flow of information and execution of the application.
This separation of entity allows you to have nimbleness and flexibility in building and maintaining your application. For example, by separating the views, you can iterate on the appearance of your application without touching on any of the core business logic. You can also separate work by role, so that, for example designers can work on the views, while developers work on the model.
ASP.NET MVC brings the power of this development paradigm to ASP.NET development, allowing you to use your .NET development skills to build MVC applications.
It gives you
Complete control over your HTML Markup
Enables rich AJAX and jQuery integration
Allows you to create SEO-friendly URLs for your site
Makes Test Driven Development (TDD) easy