![Page 1: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/1.jpg)
![Page 2: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/2.jpg)
Service Model
Programming Model
![Page 3: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/3.jpg)
Only WCF Services can leverage AppFabric
![Page 4: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/4.jpg)
![Page 5: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/5.jpg)
![Page 6: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/6.jpg)
Service Configuration (web.config)Service Configuration (web.config)
Service EndpointService Endpoint
Address (http://localhost/MyCalc.svc)Address (http://localhost/MyCalc.svc)
Binding(basicHttp)Binding(basicHttp)
Service Contract (ICalculator)Service Contract (ICalculator)
•Host
•Service Implementation
•Service Contract
•Data Contract
•Service Endpoint (Address, Binding Contract)
•Service Behavior
Key Service Key Service ConceptsConcepts
Service Contract (ICalculator)Service Contract (ICalculator)
Operations (signatures)double Add(double a, double b)double GetArea(Rectangle r)
Operations (signatures)double Add(double a, double b)double GetArea(Rectangle r)
Service Implementation (MyCalc: ICalculator)Service Implementation (MyCalc: ICalculator)
Operations (implementation)double Add(double a, double b)double GetArea(Rectangle r)
Operations (implementation)double Add(double a, double b)double GetArea(Rectangle r)
Service Behaviors (Metadata)Service Behaviors (Metadata)
Data ContractData Contract
Rectangle double width, double height
Rectangle double width, double height
![Page 7: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/7.jpg)
![Page 8: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/8.jpg)
![Page 9: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/9.jpg)
![Page 10: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/10.jpg)
•Proxy
•Endpoints
•Messages
•Service Instance
Key Client Key Client ConceptsConcepts
Service InstanceService Instance
Proxy Instance (MyCalcClient)Proxy Instance (MyCalcClient)
Client Configuration (app.config)Client Configuration (app.config)
Client EndpointClient Endpoint
Address (http://localhost/MyCalc.svc)Address (http://localhost/MyCalc.svc)
Binding(basicHttp)Binding(basicHttp)
Service Contract (ICalculator)Service Contract (ICalculator)
proxy.Add(5,
2)proxy.Add(5,
2)
Add(5,2) 7
![Page 11: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/11.jpg)
11
![Page 12: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/12.jpg)
![Page 13: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/13.jpg)
![Page 14: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/14.jpg)
Tracked Events
Normal
Operation:
ServiceHost events
Aggregates for
Operations
Completed Calls
Troubleshooting:
Throttling
Service Exceptions
User Defined Errors
Failed Calls
Faulted Calls14
![Page 15: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/15.jpg)
15
![Page 16: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/16.jpg)
16
![Page 17: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/17.jpg)
![Page 18: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/18.jpg)
DiagnosticSection config = (DiagnosticSection) WebConfigurationManager.GetSection("system.serviceModel/diagnostics");providerId = new Guid(config.EtwProviderId);myEventProvider = new EventProvider(providerId);
errorDescriptor = new EventDescriptor(ErrorEventId, Version, Channel, ErrorLevel, Opcode, Task, Keywords);
myEventProvider.WriteEvent(ref errorDescriptor, title, serviceName, errorMessage);
error event id's 301,302,303 mean error, warning, info respectively
error event id's 301,302,303 mean error, warning, info respectively
WCFUserEventProvider eventWriter = new WCFUserEventProvider();eventWriter.WriteErrorEvent(“AddOperation”, “An error occurred.”);
![Page 19: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/19.jpg)
![Page 20: Service Model Programming Model Only WCF Services can leverage AppFabric](https://reader036.vdocument.in/reader036/viewer/2022062301/56649d605503460f94a41eea/html5/thumbnails/20.jpg)
Introducing WCF Services