Download pdf - Wcf v1-day2

Transcript
Page 1: Wcf v1-day2

Naresh InformationTechnologiesTechnologies

Nagaraju BendeMCPD.NET Sr Consultant,Trainer

http://nbende.wordpress.com

Page 2: Wcf v1-day2

Agenda – Session 2

Evolution of SOA in .NET

WCF for Services Development

�������������� �����������������

WCF Programming Basics - ���

WCF Hosting

.NET support for WCF Service

Page 3: Wcf v1-day2

SOA

������

� � ��� �� � � � �� � ��

�������������� �����������������

� � ��� �� � � �

�� � ��� � �

�� � ��

� � � ���� � � �� � ��� � � � � ���� � � � � � ��� �� � � � � � �� �����

Page 4: Wcf v1-day2

Evolution of Services in .NET

� � �

������������������

� � � � � �

!"� � � !" � ��

��������������� ����������������������� ��� �����!�"#�������

�������������� �����������������

���������������!�$%��&���'((�

�����������������!�)����������(*����&���+����������

������ �����������,�������������������������

�����!�"#�������������������� ��������-

# � � $ �% � �� �

� �� � ��

& � � �

Page 5: Wcf v1-day2

ASMX .NET Remoting

Next generation of ASMX is WCF (2)������������� ������������������� ������

������������������������������������

��������������������������������

������������������������

�������������� �����������������

InteropInteropwith otherwith otherplatformsplatforms

AttributeAttribute--BasedBased

ProgrammingProgramming

Enterprise Services

WSWS--**ProtocolProtocolSupportSupport

WSE

MessageMessage--OrientedOriented

ProgrammingProgramming

System.Messaging

ExtensibilityExtensibilityLocation Location

transparencytransparency

Remoting

Page 6: Wcf v1-day2

WCF End Point

�������������� �����������������

Page 7: Wcf v1-day2

WCF Service Content

�� �������������������������������������������������� ������������������������������������������������������������������������������������������������������������������������������������������������������������������

�������������� �����������������

Page 8: Wcf v1-day2

EndPoint

�������������� �����������������

Page 9: Wcf v1-day2

• A network address wherewhere the EndPointresides

• Examples– http://silverkey.com/services/demoday.svc– net.tcp://192.168.1.200:3000/service1

AddressAddress

�������������� �����������������

– net.tcp://192.168.1.200:3000/service1– net.msmq://myserver/private/testQueue

Page 10: Wcf v1-day2

• Specifies howhow the EndPoint communicates with the world

• Defines things like– Transport (eg. HTTP, TCP )– Encoding (Text, Binary, MTOM )

BindingBinding

�������������� �����������������

– Encoding (Text, Binary, MTOM )– Security Options (SSL, Message security)

• Examples– BasicHttpBinding, NetTcpBinding,

NetMsmqBinding, NetNamedPipesBinding … etc

Page 11: Wcf v1-day2

• Specifies whatwhat the EndPoint communicates• Defines things like

– Message Exchange Patterns (one-way, duplex …)

– Service Operations

ContractContract

�������������� �����������������

– Service Operations– Behaviors (Exchange Meta-Data, Impersonation,

Authorization … etc)