whats new in wcf 4.5 ed jones grey guindon. whats new in wcf 4.5 introduction: simplify, simplify,...

20
WHAT’S NEW IN WCF 4.5 Ed Jones Grey Guindon

Upload: guy-wilding

Post on 29-Mar-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

WHAT’S NEW IN WCF 4.5Ed JonesGrey Guindon

Page 2: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

WHAT’S NEW IN WCF 4.5

Introduction: Simplify, Simplify, SimplifyThrottles, Timeouts, & QuotasSimpler Config FilesConfig File Tooltips, IntelliSense, &ValidationContract-First GenerationHTTPS For Free!OFF-TOPIC (but equally important): What’s Next in BizTalk

P:2

Page 3: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

“I submit WCF's various reader quotas and limits as irrefutable proof the way to hell is paved with good intentions.”

-Tomas Restrepo

There is an error in the XML document.

The maximum nametable character count quota (16384) has been

exceeded while reading XML data. The nametable is a data structure

used to store strings encountered during XML processing - long XML

documents with non-repeating element names, attribute names and

attribute values may trigger this quota. This quota may be increased by

changing the MaxNameTableCharCount property on the

XmlDictionaryReaderQuotas object used when creating the XML

reader.

The socket connection was aborted.

This could be caused by an error processing

your message or a receive timeout being

exceeded by the remote host, or an

underlying network resource issue. Local

socket timeout was '00:00:59.4383964'.

The maximum array length quota (16384) has been exceeded

while reading XMLdata. This quota may be increased by changing the

MaxArrayLength property onthe XmlDictionaryReaderQuotas object used when creating the

XML reader.

The formatte

r threw an exception while try

ing to deserialize

the

message: Erro

r in deserializi

ng body of request m

essage for o

peration

'SubmitQuery'. T

he 'maxim

um bytes per Read operatio

n' quota

(4096) has b

een exceeded while reading XML data. Long element start

tags (consist

ing of the element n

ame, attribute names a

nd attribute

values) may tri

gger this q

uota. This quota may be increased by changing

the MaxBytesPerRead property on th

e XmlDictionaryReaderQ

uotas

object used when creating th

e XML reader.

The maximum string content length quota

(8192) has been exceeded while reading XML data.

This quota may be increased by changing the

MaxStringContentLength property on the

XmlDictionaryReaderQuotas

Page 4: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

P:4

THROTTLES, TIMEOUTS, QUOTAS

Property On Old Value New Value

ChannelInitializationTimeout NetTcpBinding 5 sec 30 seconds

ListenBacklog NetTcpBinding, SMSvcHost.exe 10 16 * processor count

MaxPendingAccepts NetTcpBinding, NamedPipeBinding 1 2 * processor count

MaxPendingAccepts SMSvcHost.exe 2 4 * processor count

MaxPendingConnections NetTcpBinding, NamedPipeBinding 10 12 * processor count

ReceiveTimeout SMSvcHost.exe 10 sec 30 seconds

READER QUOTASName Old Value New Value

MaxArrayLength 16384 elements Int32.MaxValue (text)

MaxBytesPerRead 4096 bytes Int32.MaxValue (text)

MaxDepth 32 nodes deep 128

MaxNameTableCharCount 16384 characters Int32.MaxValue (text)

MaxStringContentLength 8192 characters Int32.MaxValue (text)

Page 5: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

CONTRACT FIRST UTILITY

WCF 4.5 give us the capability to build data contracts and classes directly from XSDs.To use the contract-first tool, the XSD must be downloaded locally.The contract-first tool is integrated into Visual Studio 2012 as a build task.You can configure how the dev environment will create the contracts through the “WCF Options” item in the Project properties.

P:5

Page 6: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

CONTRACT-FIRST SETTINGS• Serializer Mode: This setting determines which serializer is used for reading service contract

files• Reuse Types: This setting specifies which libraries are used for type reuse. • Collection Type: This setting specifies the fully-qualified or assembly-qualified type to be used

for the collection data type. • Dictionary Type: This setting specifies the fully-qualified or assembly-qualified type to be used

for the dictionary data type.• EnableDataBinding: This setting specifies whether to implement the INotifyPropertyChanged

interface on all data types to implement data binding.• ExcludedTypes:This setting specifies the list of fully-qualified or assembly-qualified types to be

excluded from the referenced assemblies. • GenerateInternalTypes: This setting specifies whether to generate classes that are marked as

internal. • GenerateSerializableTypes: This setting specifies whether to generate classes with the

SerializableAttribute attribute. • ImportXMLTypes: This setting specifies whether to configure the data contract serializer to apply

the SerializableAttribute attribute to classes without the DataContractAttribute attribute• SupportFx35TypedDataSets: This setting specifies whether to provide additional functionality

for typed data sets created for .Net Framework 3.5..• InputXsdFiles: This setting specifies the list of input files.• Language: This setting specifies the language of the generated contract code.

NamespaceMappings: This setting specifies the mappings from the XSD Target Namespaces to CLR namespaces. OutputDirectory: This setting specifies the directory where the code files will be generated.

P:6

Page 7: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

BETTER INTEGRATION WITH THE HOST

• Automatically inherit the security settings for IIS• Inherit SSL settings• Inherit authentication modes (and will also support

multiple authentication modes per end point )

**** previously if you wanted to configure a WCF endpoint that supported a variety of the transport security modes, those were each separate end points and there was one per end point and they would often sit at different addresses - 4.5 will support multiple authentication modes.

P:7

Page 8: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

INTELLISENSE – TOOL TIPS

P:8

With Intellisense you get context help (Tooltip Text) that helps to define a particular selection

Page 9: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

INTELLISENSE – TYPES OF

When configuring an <endpoint> you can now reference a dropdown for the contract (Intellisense lists all contracts in your project)

P:9

Page 10: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

INTELLISENSE – TYPES OF

When configuring custom bindings – say wiring up a binding reference type in the definition of your <endpoint> - Intellisense is smart enough to reference those which are (already) defined within your config file…

P:10

Page 11: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

CLEAN CLIENT CONFIGURATION GENERATION

P:11

Page 12: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

DEMO

P:12

Page 13: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

CLASSES FROM XML

You can generate a class from a sample XML document using the “Paste XML as classes” feature of Visual Studio.This is a .NET 4.5 feature (not specific to WCF)

P:13

Page 14: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

DEMO

P:14

Page 15: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

“Reports of my death are greatly exaggerated”

–BizTalk Server*

*also Mark Twain

P:15

Page 16: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

WHAT’S NEXT IN BIZTALK SERVER (2010 R2)

Platform Update: support for Visual Studio 2012, Windows 8 Server, SQL Server 2012, Office 15 and System Center 2012 B2B enhancements to support the latest standards natively– HL7 2.5.1, 2.6– SWIFT 2012 Message Pack– X12 5030+, EDIFACT D05B+

Better performance – Multi-fold improvements ordered send port scenarios – Improvements to the performance of dynamic send ports and

ESB, via host handler association of send ports– MLLP adapter performance

P:16

Page 17: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

Better manageability– Visualize BizTalk artifact dependencies in BizTalk Admin

console– ESB Toolkit as core part of BizTalk setup and product

Improved Connectivity– Consume REST services directly in BizTalk– Simplified SharePoint integration experience– Improvements to existing adapters (e.g., HIS, SMTP)– Easy connectivity to Azure Service Bus relay, queues

and topics

and BizTalk running in Azure…

P:17

Page 18: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

BIZTALK 2010 R2 TIMELINES

The CTP version is available now as an Azure VMBeta will be released sometime in OctoberRTM will happen about 6 months after Windows Server 2012 releases (April 2013ish?)

P:18

Page 19: WHATS NEW IN WCF 4.5 Ed Jones Grey Guindon. WHATS NEW IN WCF 4.5 Introduction: Simplify, Simplify, Simplify Throttles, Timeouts, & Quotas Simpler Config

REFERENCES:

Daniel Roth, “What’s New in Windows Communication Foundation in Microsoft .NET 4.5”Bala Sriram & Rajesh Ramamirtham, “Application Integration Futures: the Roadmap and What’s Next on Windows Azure”Javed Sikander & Rajesh Ramamirtham, “Building Integration Solutions Using Microsoft BizTalk On-Premises and on Windows Azure”MSDN, “Contract First Tool”, http://msdn.microsoft.com/en-us/library/hh674270.aspxMSDN, “Generating Data Type Classes from XML”, http://msdn.microsoft.com/en-us/library/hh371548.aspx

P:19