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


Top 5 Contributors of the Month
Alankar


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

Can we have multiple endpoints for different binding types in order to serve different types of clients?

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

Yes, we can have multiple endpoints for different binding types. For example, an endpoint with wsHttpBinding and another one with netTcpBinging.

Why to use WCF? or What are the advantages for using WCF?

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

. Service Orientation is one of the key advantages of WCF. We can easily build service-oriented applications using WCF.
. If compared with ASMX web services, WCF service provides reliability and security with simplicity.
. As oppose to .NET Remoting, WCF services are interoperable.
. Different clients can interact with same service using different communication mechanism. This is achieved by using service endpoints. A single WCF service can have multiple endpoints. So, developer will write code for service once and just by changing configuration (defining another service endpoint), it will be available for other clients as well.
. Extensibility is another key advantage of WCF. We can easily customize a service behavior if required.

Which command is used to convert WSDL to a proxy

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

svcutil.exe command will convert the WSDL to a proxy class for our client

Open visual studio command prompt window
click on visual studio command prompt,set the current folder to the location where you want the generated proxy and configuration files to be created.

Run SvcUtil.exe to generate the output files.

State 3 Duplex contract problems in WCF ?

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

(1) Threading problems can occur if either of the Callback channels are not empty.

(2) If the client and service has a long running work then this pattern doesn't scale very well. It can block the client or the service until the process is completes !

(3) It requires a connection back to the client. And there may be a chance to not connect back due to firewall and Network Address Translation problems.


Note :- It is always better to use Request / Response MEP rather than using Duplex method.

hy it is dangerous to send a oneway message in WCF ?

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

It is dangerous to send a oneway message since there is no assurance that the operation is processed or not.

In WCF, is returning a void return type returns anything ?

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

[ServiceContract]

public interface IService1

{

[OperationContract]

void Employee(string value);

}


In the above case, the response message is still being sent back to the client. The difference is it sends an empty SOAP body.
So, returning void doesn't mean it will not return anything to the Client !


What is a WCF Test Client ?

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

WCF Test Client is a GUI tool which enables us to enter parameters, invoke services with these parameters and view the responses returned by services.


After you create a new WCF service project and press F5 to start the debugger, the WCF Service Host begins to host the service in your project. Then, WCF Test Client opens and displays a list of service endpoints defined in the configuration file. You can test the parameters and invoke the service, and repeat this process to continuously test and validate your service.

ServiceContract, DataContract and MessageContract maps to which web services standard ?

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

(1) ServiceContracts maps to WSDL
(2) DataContracts maps to XSD
(3) MessageContracts maps to SOAP

What namespace is used by ASMX and WCF respectively for serialization ?

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

For serialization, WCF uses the System.Runtime.Serialization namespace for serialization.

Web service(i.e), ASMX uses System.Xml.serialization namespace.

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/

« Previous12345678910….481482Next »


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