.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sandeep Singh
Mayuri
stevemarkayden
kumarfurima
Preethi


Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Post New Question Subscribe to Interview Questions
 
Quick Links For Interview Questions Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  OOPs  JQuery  JavaScript/VBScript
BiztalkPatten/Practices.IISWCFWPFWWF
NetworkingAptitudeOthers  All    
 

Interview Questions And Answers

Give some examples of varying address in WCF ?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

An address can vary, depending on whether it is hosted by Microsoft Internet Information Services (IIS) on a public network or hosted locally on an internal network computer. It can also vary, depending on the protocol the binding uses. For example, all the following could be valid addresses:

(1) http://www.google.com/MyService/
(2) http://localhost:9800/Service1/MyService/
(3) net.tcp://localhost:9801/MyService/

What is meant by WS Addressing Standard in WCF ?

Author: Alankar          Posted Date: April 02, 2015    Category: .NET Framework     Points: 40

The address for an endpoint is a unique URL that identifies the
location of the service. The address should follow the Web Service Addressing (WS-Addressing) standard, and they are :-

(1) Scheme - This is typically "http" followed by a colon.

(2) Machine - Identifies the machine name, which can be a public URL such as "www.google.com" or a local identifier such as "localhost".

(3) Port - The optional port number, preceded by a colon.

(4) Path - The path used to locate the service files. Typically, this is just the service name, but the path can consist of more than one level when a service resides in a directory structure.


In WCF, if your service wants an authentication before it is used then what is the best way to handle an authentication mechanism with WCF?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

The best way to handle this would be to design a Message contract that
accepts these authentication tokens in the header of the message.

In WCF, suppose you have a derived class inherited from a datacontract class, will the derived class automatically have a datacontract as well ?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

The Data contract is not inherited, so any derived class, would have to be explicitly declared as having a Data contract attribute as well.


How to publish service metadata?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

WCF services publish its metadata by exposing one or more metadata endpoints. Publishing service metadata makes service metadata available using standardized protocols, such as MEX and HTTP/GET requests.
Metadata endpoints are the same as other service endpoints and have an address, a binding, and a contract.
You can add metadata endpoints to a service host in configuration or in code.

What is a metadata export?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

Metadata Export is the process of describing the service endpoints and projecting them into a parallel, standardized representation that clients can use to understand how to use the service.

How can we specify the throttling behavior for a WCF service?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

Throttling behavior is specified by the following three parameters.

1. MaxConcurrentCalls - Total no of concurrent calls service will accept
2. MaxConcurrentSessions - Total no of sessionful channels service will accept
3. MaxConcurrentInstances - Total no of service instances will be created for servicing requests.

It can be specifed either through code or configuration file. It requires the "System.SystemModel.Behavior" namespace to be included.

What is a Throttling behavior in WCF?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

Throttling behavior of the WCF service holds the configuration for three limitations that control the amount of resources that your service hosting can allocate to deal with the client request. Thus it enables to
1. Manages resource Usage
2. Balances performance load


Explain the functionality of the Message layer in WCF.

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

The Messaging layer contains channels that process messages and operate on messages and message headers. The messaging layer has eight channels which defines the possible formats and data exchange patterns.
The eight channels are divided into two categories.

1. Transport Channels
These channels helps reads and write messages from the network.
1. WS Security Channel
2. WS Reliable MessagingChannel
3. Encoders:Binary/ MTOM/ Text/ XML

2. Protocol Channels
These channels implement message processing protocols.
1. HTTP Channel
2. TCP Channel
3. TransitionFlow Channel
4. NamedPipe Channel
5. MSMQ Channel

List the behaviors included in Service Runtime of the WCF layer?

Author: Alankar          Posted Date: April 02, 2015    Category: WCF     Points: 40

The following behaviors are included in the WCF Service Runtime layer..

1. Throttling behavior
Throttling behavior provides the options to limit how many instances or sessions are created at the application level.

2. Error behavior
By implementing IErrorHandler interface WCF allows an implementer to control the fault message returned to the caller and also it performs custom error processing such as logging

3. Metadata behavior
Through the metadata behavior we can publish metadata of the service by configuring an endpoint to expose the IMetadataExchange contract as an implementation of a WS-MetadataExchange (MEX) protocol. By default it is disabled.

4. Instance behavior
This behavior specifies how many instance of the service has to be created while running WCF.

5. Transaction behavior
This is used to enables the rollback of transacted operations if a failure occurs.

6. Dispatch behavior
This behavior controls how a message is processed by the WCF Infrastructure.

7. Concurrency behavior
Concurrency behavior measures how many tasks can be performed simultaneously

9. Parameter Filtering
This demonstrates how to validate the parameters passed to a method before it is invoked.



Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend