You must Sign In to post a response.
  • Category: WCF

    Asked questions in interview

    Hi All,

    I have recently attend interview in reputed MNC. Below are the list of questions.
    And answered most of the questions in my point of view, but expecting answers for below questions.

    1. What is WCF and what problem does it solve compared to ASMX services?
    2. How do we configure Endpoint Behavior?
    3. How message security is different from Transport security? What are the differences in their configuration?
    4. What is file less/ hosting?
    5. What is service discovery?
    6. How would you force your client to send message Id?
    7. Is there any constraint to use USING block?
    8. What is IDisposable Interface?
    9. If there is any exception in using block, will the resources get released automatically?
    10. What is the difference between "throw exception" and "throw"?
    11. What is the significance of finally block?
    12. How do we implement logging?
    13. What is delegate and which scenario you would like to use it?
    14. What is anonymous type? Can we pass anonymous type as input parameter to a method? Can we use it as return type from a method?
    15. What is the difference between Interface and Abstract class? Why we cannot make an instance of Interface? Can we make an instance of Abstract class?
    16. What is asynchronous process?
    17. How does worker process the outcomes?
    18. Have you worked on Unit testing? What framework you have used?
    19. How does MOQ help in Unit Testing?
    20. Have you worked on functional test? How do we implement data driven functional test?
    21. What is Inversion of control? What are the ways to implement it?
    22. What is Observer pattern and how do we implement?
    23. What is unity container?
    24. What is factory pattern?
    25. What are the agile ceremonies?
    26. What are the agile tools you have used?
    27. What is gated check-in and what's the constraint we do have?

    Thanks in advance
  • #757756
    The answer of these question is same and everywhere on internet you can just googleit.
    Even lots of answer on dotnetspider.com's interview question section are there.

    But expectation of interview is basically depends on person to person.
    In normal case if you are giving answer in interview than you should co relate your answer with some real time example which you already did in your last project.

    Regards & thanks
    Arvind kumar
    Visit--blog.akumars.esoftera.in

  • #757760
    WCF vs ASMX
    A ASMX file is a Web Service is programmable application logic accessible via standard Web protocols.
    Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another.
    IDisposable
    it is the interface used to release memory occupied by different managed and unmanaged resources
    The primary use of this interface is to release unmanaged resources. The garbage collector automatically releases the memory allocated to a managed object when that object is no longer used. However, it is not possible to predict when garbage collection will occur

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #757768
    Hi Rajan,

    Answers:
    1) Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application.
    ASMX Web services can only be invoked by HTTP (traditional webservice with .asmx). While WCF Service or a WCF component can be invoked by any protocol (like http, tcp etc.) and any transport type.
    2) <configuration>
    <system.serviceModel>
    <behaviors>
    <endpointBehaviors>
    <behavior name="myBehavior">
    <clientVia />
    </behavior>
    </endpointBehaviors>
    </behaviors>
    <bindings>
    <basicHttpBinding>
    <binding name="myBinding" maxReceivedMessageSize="10000" />
    </basicHttpBinding>
    </bindings>
    <client>
    <endpoint address="myAddress" binding="basicHttpBinding" bindingConfiguration="myBinding" behaviorConfiguration="myBehavior" contract="myContract" />
    </client>
    </system.serviceModel>
    </configuration>

    // configurining Behaviors Programmatically
    public class Client
    {
    public static void Main()
    {
    try
    {
    // Picks up configuration from the config file.
    ChannelFactory<ISampleServiceChannel> factory
    = new ChannelFactory<ISampleServiceChannel>("WSHttpBinding_ISampleService");

    // Add the client side behavior programmatically to all created channels.
    factory.Endpoint.Behaviors.Add(new EndpointBehaviorMessageInspector());

    ISampleServiceChannel wcfClientChannel = factory.CreateChannel();

    // Making calls.
    Console.WriteLine("Enter the greeting to send: ");
    string greeting = Console.ReadLine();
    Console.WriteLine("The service responded: " + wcfClientChannel.SampleMethod(greeting));

    Console.WriteLine("Press ENTER to exit:");
    Console.ReadLine();

    // Done with service.
    wcfClientChannel.Close();
    Console.WriteLine("Done!");
    }
    catch (TimeoutException timeProblem)
    {
    Console.WriteLine("The service operation timed out. " + timeProblem.Message);
    Console.Read();
    }
    catch (FaultException<SampleFault> fault)
    {
    Console.WriteLine("SampleFault fault occurred: {0}", fault.Detail.FaultMessage);
    Console.Read();
    }
    catch (CommunicationException commProblem)
    {
    Console.WriteLine("There was a communication problem. " + commProblem.Message);
    Console.Read();
    }
    }

    We can not give you answer of each questions over here you just try to find it on google, some answer are also available on dotnetspider.com

    Regards,
    Nirav Lalan
    DNS Gold Member
    "If you can dream it, you can do it."


  • Sign In to post your comments