.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

What are the four layers in WCF architecture?

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

SOA based WCF architecture has four layers.

1. Contracts
It describe the WCF message system. This is achieved by three contracts with policies and bindings.
i. Service Contract - Describes the method signature of the service using C# or VB
ii. Data Contract - Enables .NET types to be in XML
iii. Message Contract - Defines the structure os the SOAP message exchanged between the service and client
iv. Policies and Bindings - Defines the security level required by the clients

2. Service Runtime
This includes the behaviors that occur when service is running.

3. Messaging
This layer contains the channels that process messages and operate on messages and message headers

4. Hosting
Describes the ways in which WCF service can be hosted.

What are the principles WCF implement?

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

WCF services effectively communicates with the clients through these principles.

1. Explicit boundaries
WCF services function using the defined interfaces to identify the communications between server and client that flow outside the boundaries of the service

2. Independent services
WCF services are deployed and managed independently and each service interaction is independent of other interactions. They are independent of deployment, installation and version issues.

3. Schema and contract based communication
WCF services communicate with clients by providing only the schema of the message and not its implementation classes. The service implementation can be changed if required without impacting the clients

4. Policy based compatibility
Compatibility between WCF services and clients at runtime is determined using published policies. Policies help separate the description of the service fro its implementation details.

What are the benefits of WCF?

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


The benefits include the following

1. Transactional support
2. Asynchronous one-way messaging
3. Interoperability
4. Independent versioning
5. Platform Consolidation


What are the benefits of WCF?

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

The benefits include the following

1. Transactional support
2. Asynchronous one-way messaging

What is the difference between RIA and WCF services?

Posted by: Niladri.Biswas
Some points are as under

1) WCF is concerned with technical aspects of communication between servers across tiers and message data management whereas RIA Web Services delegates this
functionality to WCF.

2) WCF is a generic service that could be used in Windows Forms for example whereas RIA Web Services is focused on Silverlight and ASP.NET clients

3) WCF does not generate source code to address class business logic such as validation that may need to be shared across tiers like RIA Web Services does.

4) The RIA Services can either exist on top of WCF or replace the WCF layer with RIA Services using alternatice data source e.g. an ORM layer(EF/NHibernate etc.)

5) RIA Services allow serializing LINQ queries between the client and server.


How many different types of authorization supported by WCF ?

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

Role-based : Map users to roles and check whether a role can perform the requested operation.
. Identity-based : Authorize users based on their identity.
. Claims-based : Grant or deny access to the operation or resources based on the client's claims.
. Resource-based : Protect resources using access control lists (ACLs)

What is the difference between RIA and WCF services?

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

Some points are as under

1) WCF is concerned with technical aspects of communication between servers across tiers and message data management whereas RIA Web Services delegates this
functionality to WCF.

2) WCF is a generic service that could be used in Windows Forms for example whereas RIA Web Services is focused on Silverlight and ASP.NET clients

3) WCF does not generate source code to address class business logic such as validation that may need to be shared across tiers like RIA Web Services does.

4) The RIA Services can either exist on top of WCF or replace the WCF layer with RIA Services using alternatice data source e.g. an ORM layer(EF/NHibernate etc.)

5) RIA Services allow serializing LINQ queries between the client and server.

What is Windows Server AppFabric?

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

It is a set of extensions to the Windows OS aimed at making it easier for developers to build faster, scalable, and more-easily managed services.

It provides a distributed in-memory caching service and replication technology that helps developers improve the speed and availability of .NET Web applications and WCF services.

If you are hosting WCF services by using IIS or WAS in a production environment, you might want to consider implementing Windows Server AppFabric.

You can use use AppFabric in place of Memcached because AppFabric provides more feature than Memcached

Difference between reliable messaging and reliable sessions in WCF ?

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

Reliable messaging is concerned with ensuring that messages are delivered exactly once.

Reliable session provides a context for sending and receiving a series of reliable messages. reliable sessions have a dependency on reliable messaging.

You have to use reliable messaging to provide an end-to-end reliable session between a client application and a service.

So finally, both are different but related concepts


In what are the different ways a WCF Metadata can be accessed ?

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

WCF Metadata can be accessed in two ways :-

(1) WSDL document can be generated which represents the endpoints and protocols

(2) Or the ServiceHost can expose a metadata exchange endpoint to access metadata at runtime

Can you show a sample of Duplex Contract in WCF ?

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


[ServiceContract(Namespace = "http://www.Microsoft.com",

SessionMode = SessionMode.Required,

CallbackContract = typeof(IDuplexCallBack) )]



public interface IService1

{

[OperationContract(IsOneWay = true)]

void getData();

}



public interface IDuplexCallBack

{
[OperationContract(IsOneWay = true)]

void filterData(DataSet Output);

}


In the above code, getData() is a method which will be called by the client on the Service. This getdata() is implemented in the server side.

filterData() is a method which will be called by the server on the Client. This method is implemented in the client side.

CallbackContract is the name of the contract which will be called by the server on the client to raise an event or to get some information from the client.



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