Books MVC ASP.NET C# SQL Server WCF Written Test HR Round Subscribe C# Videos C# Programs Buy DVD

Monday, February 21, 2011

WCF Interview Questions on Contract Versioning


Click here for all SQL Server Interview Questions


Click here for all WCF Interview Questions


Click here for all ASP.NET Interview Questions


Click here for all C# Interview Questions


Click here for Written Test or practical ASP.NET Interview Questions asked in MNC's


What is WS-Policy?
             OR
What is Web Services Policy?
Web Services Policy or WS-Policy is an interoperable standard for describing policies that influence communication with the clients. Usually WS-Policy is included in the WSDL contract exposed by the WCF service, although it is optional.


What is the use of WS-Policy?
WS-Policy is generally used for
1. Describing protocols for accessing operations
2. Security
3. Reliable messaging
4. Transactions
5. Message encoding (Message Transmission Optimization Mechanism [MTOM])
6. Other protocols


You can specify the above settings in WSDL directly without a policy section, but the disadvantage is that, once published, the WSDL contract is final. If the clients has to communicate with a WCF service that has changed the settings in the WSDL, the clients need to rebuild the proxy and configuration or atleast the changes to the WSDL contract must support backward compatibility.


The advantage of using WS-Policy is that it can change over time, and the clients can discover the changed policy to communicate via metadata exchange. But keep in mind that, you can only change the policy safely if clients are positioned to handle dynamic changes.



Are WCF Contracts version tolerant?
Yes, WCF contracts are version tolerant by default. Service contracts, data contracts, and message contracts forgive missing and non required data. They also Ignore any superfluous or additional data sent by the client to the service. The DataContractSerializer provides tolerance. Reasonable changes can be made without impacting existing clients.


The following table summarizes the changes to a service contract and impact on existing clients.



Click here for all SQL Server Interview Questions


Click here for all WCF Interview Questions


Click here for all ASP.NET Interview Questions


Click here for all C# Interview Questions


Click here for Written Test or practical ASP.NET Interview Questions asked in MNC's

4 comments:

  1. Hi Venkat,
    How to implement message level security in WCF

    ReplyDelete
  2. Hi Venkat,
    Thank you so much for your videos on C#,ASP.NET ,SQL and MVC. When ever you have time could you provide videos on WCF, Webservices and REST.

    ReplyDelete
  3. Hi Venkat,

    Thanks for all the videos and your website rocks.Very helpful for the people who attend the interviews....Thanks again for all your hard work.

    ReplyDelete
  4. Thank you venkat for providing such awesome concepts

    ReplyDelete

If you are aware of any other WCF questions asked in an interview, please post them below. If you find anything missing or wrong, please feel free to correct by submitting the form below.

 
Disclaimer - Terms of use - Contact Us