Pages

Friday, March 15, 2013

Whats New in WCF 4.5


In the .NET Framework 4.5, a lot of new features have been added to make it simpler Windows Communication Foundation (WCF) applications:

·         Simplification of generated configuration files
Here in WCF 4.5 the config file become simpler in the sense as instead of showing all the binding whether it is default or not, it will only contains the binding where the value is modified from default to others.

·         Support for Contract-first development
This feature will let you create service reference from WSDL file by using svcutl.exe /serviceContract switch

·         ASP.NET compatibility mode
WCF provides ASP.NET compatibility mode to grant developers full access to the features in the ASP.NET HTTP pipeline when writing WCF services. To use this mode, you must set the aspNetCompatibilityEnabled attribute to true in the  section of web.config. Additionally, any service in this appDomain needs to have the RequirementsMode  property on its AspNetCompatibilityRequirementsAttribute set to Allowed or Required. By defaultAspNetCompatibilityRequirementsAttribute is now set to Allowed

·         Default Transport Values
Some new Default transport values are set like
                        channelInitializationTimeout
                        listenBacklog
maxPendingAccepts
maxPendingConnections
receiveTimeout

·         XmlDictionaryReaderQuotas Class Updated
Some values are set to as
MaxArrayLength                   (max int value)
MaxBytesPerRead                  (max int value)
MaxDepth                               (128 Nodes)
MaxNameTableCharCount     (max int value
MaxStringContentLength       (max int value)

·         Validation of WCF config file
Now in the build process WCF configuration files are validated.  List of validation errors or warnings are displayed in Visual Studio if the validation fails.

·         New asynchronous streaming support
Streaming becomes smoother as the sending thread will not block the process and there will be a limitation on the buffer size for sender.

·         New HTTPS protocol
The IIS can now support the HTTPS protocol.

·         Ability to generate metadata in a single WSDL
   The metadata of the service can now be generated in a single file by appending. ?singleWSDL in the URL.

·         Websockets support
Bidirectional communication over port 80 and 443, just like the TCP protocol.

·         Support for configuring services in code
A developer can now configure the file by simply modifying the config file; there is no need to compile the code again.

·         XML Editor tooltips
The XML editor will now provide the tooltip as well for every node element.

·         ChannelFactory Caching support
WCF can cache channel factories while developer is using a WCF client proxy

·         Binary encoder compression support
Binary encoding and the file compression is now supported at the service level as will so there will not be chance of a fault if the client use this but the service does not have.

·         UDP Protocol support
Now the service client can sends a message to a service and there is no need to wait till the response comes.

·         Multiple authentication Support
The Service can now support multiple authentications just like the IIS do in the virtual directory if you are using HTTP transport protocol.

·         IDN Support
WCF can now support International Domain Name as well.


Thanks
Anil Kumar Pandey
Microsoft MVP, Microsoft MCC, DNS MVM

No comments:

Post a Comment

Kontera