260 likes | 363 Views
.NET Framework 3.0 - Enterprise. Agenda. WCF Overview WCF Solutions WF Overview WF Solutions Card Spaces Bringit it all together: Dinner Now Scenario. Remoting. COM. D/COM. COM+. MSMQ. WSE. ASMX. WCF Overview. For pieces of software to communicate … . Yesterday:.
E N D
Agenda • WCF Overview • WCF Solutions • WF Overview • WF Solutions • Card Spaces • Bringit it all together: Dinner Now Scenario
Remoting COM D/COM COM+ MSMQ WSE ASMX WCF Overview For pieces of software to communicate … Yesterday: Many confusing and complicated options Now: Windows Communication Foundation One simple choice that is always the best option
How Does it work? Data Service Model Address, Binding, Contract & Behaviors Metadata Channel Layer Protocols, Encoders & Transports Messages
How do I use it? [ServiceContract] public interface IMyInterface { [OperationContract] MyOutputType MyMethod(MyInputType myData); } Service Contract Definition [ServiceBehavior(InstanceContextMode=Single] public class MyService: IMyInterface { public MyOutputType MyMethod(MyInputType myData) { //my code … } } Contract Implementation (Service Type) <service name=“MyService”> <endpoint address=“MyAddress” binding=“netTcpBinding” contract=“IMyInterface” /> <service/> Endpoint Configuration
How Do I Deploy it? Two options: Web Host within IIS • For HTTP services on XP SP2 & WS2K3 • For any service on Vista & Windows Server “Longhorn” • Proven reliability, scalability and security • Requires a .svc file to identify the Service Type Self-Host within any .NET process • Available for any service • Console apps, windowed apps, .NET NT Services …
Addresses <services> <service <host> <baseAddresses> <add baseAddress="http://localhost:8000/MyBaseAddress"/> </baseAddresses> </host> name=“MyService”> <endpoint address=“MyEndpointAddress” binding=“wsHttpBinding” bindingConfiguration=“MyReliableBinding” contract=“IMyInterface” /> <service/> </services>
Binding <endpoint name=“MyService” address=“MyAddress” binding=“netTcpBinding” contract=“IMyInterface” />
Contract [ServiceContract] public interface IMyInterface { [OperationContract] MyOutputType MyMethod(MyInputType myData); } • Serialization is done by DataContractSerializer by default • Handles “built-in” .NET types automatically • User-defined types require Data Contracts: • Can opt for the older, slower XmlSerializer: [DataContract] public class MyDataContract { [DataMember] public string MyField; } [ServiceContract] [XmlSerializerFormat] public interface IMyInterface
Integration Configure WCF components to use BasicHttpBinding Upgrade Remoting & WSE 2 components to WCF For HTTP, use properly configured WSHttpBinding For TCP, custom TCP transport sample on NETFX 3.com
WF Overview Windows Workflow Foundation is the programming model, engine and tools for quickly building workflow enabled applications on Windows. • Single workflow technology for Windows • Available to all customers of Windows • Available for use across a broad range of scenarios • Redefining workflow • Extensible framework & API to build workflow centric products • One technology for human and system workflow • Take workflow mainstream • Bring declarative workflow to any .NET developer • Fundamental part of the Office 2007 • Strong workflow partner & solution ecosystem
What is WF A set of activities that coordinate people and / or software... EscalateToManager CheckInventory Example activities…. …organized into some form of workflow. Or a state diagram…. or based on rules. Like a flowchart….
Concepts and components Visual Designer Key Concepts • Workflows are a set of Activities A Workflow • Workflows run within a Host Process:any application or server • Developers can build their own Custom Activity Libraries An Activity Custom Activity Library Components Windows Workflow Foundation • Base Activity Library:Out-of-box activities and base for custom activities Base Activity Library • Runtime Engine:Workflow execution and state management Runtime Engine • Runtime Services:Hosting flexibility and communication Runtime Services • Visual Designer: Graphical and code-based construction Host Process
What are activities • An activity is a step in a workflow • Has propertiesandevents that are programmable within your workflow code • Has methods (e.g. Execute) that are only invoked by the workflow runtime • Think of Forms & Controls • Activity == Controls • Workflows == Forms • Activities fall under two broad categories • Basic – steps that “do work” • Composite – manage a set of child activities
Domain-SpecificWorkflow Packages Compliance CRM Extend activity Compose activities RosettaNet Author new activity IT Mgmt • Vertical-specificactivities & workflows • Best-practice IP &Knowledge Extensibility Custom ActivityLibraries Base Activity Library Out-of-Box Activities • OOB activities,workflow types,base types • General-purpose • Activity libraries define workflow constructs • Create/Extend/Compose activities • App-specificbuilding blocks • First-class citizens
Identity Crisis • The Internet is dangerous! • Identity theft, spoofing, phishing, phraud • Username + password is weak and overwhelmed • Enterprises are in identity silo hell 25% Stopped 22% Cut back www.antiphishing.org
Safe and secure Internet for all Safely, reliably identify sites to users… …and users to sites Connected Systems Internal and external Goals
Identity provider for MSN 300M+ users, > 1 billion logons/day Identity provider for the Internet Failure Why? Passport?
Subject Claims Security Token Digital Identity
Identity: set of claims in a security token Roles: Subject Identity Provider Relying Party Protocol: User is asked for identity User chooses an identity provider Identity provider gives user a security token User passes the token to the requestor Abstracting Identity
Protocol Drill Down User User approves release of token 7 Client 4 User selects an IP Client wants to access a resource 1 Request security token 5 3 Which IPs can satisfy requirements? RP provides identity requirements 2 6 Return security token based on RP’s requirements Token released to RP 8 Identity Provider(IP) Relying Party(RP)
Kerberos X.509 SAML Custom WS-Trust, WS-MetadataExchange WS-* Metasystem Architecture Identity Provider Relying Party Identity Provider Relying Party Security Token Service Security Token Service WS-SecurityPolicy WS-SecurityPolicy Identity Selector Subject
Windows Cardspaces • Easily and safely manage your digital identities • Authenticate with websites and web services Safer Easier No usernames and passwords Consistent login and registration Avoid phishes Multi-factor authentication Built on WS-* Web Service Protocols