Download - Basics of WCF and its Security
![Page 1: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/1.jpg)
Getting started withWindows Communication Foundation & its Security
By,
Ratan Sharma
![Page 2: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/2.jpg)
Agenda
→ History of Web Services
→ Service Orientation
→ Introduction to WCF
→ WCF Architecture
→ End points
→ Demo
→ WCF Security
→ Security support for different bindings
→ Security modes
→ Demo
![Page 3: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/3.jpg)
COMComponent object model
DCOMDistributed COM
.Net Remoting
COM +
Mechanism for communicating between applications and componentsrunning on the Windows platform for same computer.
Mechanism for communicating between applications and componentsrunning on other computers over a network.
Integration with Microsoft Transaction Server so applications could group operations on components together into transactions.
A client application could access a remote object hosted by a remote server application as if it were running locally, inside the client application
Mechanism for communicating between applications and componentsrunning on the Windows platform for same computer.
Inter Process Communication Technologies
![Page 4: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/4.jpg)
→ Web Service
![Page 5: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/5.jpg)
BALANCE between push and pull.. (Common Data format & Common Protocol)
Choice: How do you want to get info? How do you want to deliver it?
![Page 6: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/6.jpg)
What is WCF ?Windows Communication Foundation (WCF) is a technology for developing applications based on service-oriented architecture (SOA).
![Page 7: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/7.jpg)
The four tenets of service orientation
Service compatibility is determined based on policy Service compatibility is determined based on policy
Services share schema and contract, not class Services share schema and contract, not class
Services are Autonomous Services are Autonomous
Boundaries are Explicit Boundaries are Explicit
![Page 8: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/8.jpg)
Why WCF ??
→ Multiple protocol support→ Full duplex communication→ Different hosting environment→ Different serializer option→ Messages can be queued using persistence queuing. As a
result, no delays occur, even under high traffic conditions.
![Page 9: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/9.jpg)
WCF
.Net Remotin
g
Enterprise
Services
Messaging
ASMX
WSE
Interop withOther platforms
WS* Protocol support
Message oriented programming
Extensibilitylocation
transparencyAttribute
basedprogramming
![Page 10: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/10.jpg)
WCF Architecture
![Page 11: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/11.jpg)
How to reach your service ?
Address : URI of the WCF service
- Transport Scheme-Server location- Port- Path
Binding : Defines how the WCF service handles the request
- BasicHttpBinding, NettcpBinding etc
Contract : Defines what public data and interfaces the WCF service
provides to the client.
- Service contract, Data Contract, Fault Contract, Message Contract
End Point
![Page 12: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/12.jpg)
Instance Management
New InstanceNew InstanceNew Instance
Instance
Per-Call
Singleton
Per-Session
Request
Instance 1Instance 2Instance 3
Client
Client 1Client 2 Client 3
Request
Request
Client 1Client 2 Client 3
![Page 13: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/13.jpg)
Demo
![Page 14: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/14.jpg)
WCF Security
Authorization
IntegrityConfidentiality
Authentication
![Page 15: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/15.jpg)
Security Mode
5 possible security modes→ None→ Transport→ Message→ Both (only msmq support this)→ TransportWithMessageCredential→ TransportCredentialOnly
![Page 16: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/16.jpg)
Bindings supporting Transport, Message and mixed mode
Binding Transport Mode? Message Mode? Mixed Mode?
BasicHttpBinding Yes Yes Yes
WSHttpBinding Yes Yes Yes
WSDualHttpBinding No Yes No
NetTcpBinding Yes Yes Yes
NetNamedPipeBinding Yes No No
NetMsmqBinding Yes Yes No
MsmqIntegrationBinding Yes No No
wsFederationHttpBinding No Yes Yes
![Page 17: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/17.jpg)
Message over a Channel
MessageMessage
MessageMessage
$%$^$^$%#$%
W$#@%#$^$%^
$%^^@$#% $%^^ @$#%
WCF Client WCF ServiceEndPoint Message
Message
WCF Client
WCF Client
WCF Client
WCF Client
WCF ServiceEndPoint
WCF ServiceEndPoint
WCF ServiceEndPoint
WCF ServiceEndPoint
WCF ServiceEndPoint
WCF ServiceEndPoint
![Page 18: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/18.jpg)
Demo
![Page 19: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/19.jpg)
Questions ?
![Page 20: Basics of WCF and its Security](https://reader035.vdocument.in/reader035/viewer/2022062418/5561e6bdd8b42aa5068b4f3e/html5/thumbnails/20.jpg)
References
→ Codeplex.com
→ CodeProject.com