Online Mind Mapping and Brainstorming

Create your own awesome maps

Online Mind Mapping and Brainstorming

Even on the go

with our free apps for iPhone, iPad and Android

Get Started

Already have an account? Log In

Develop Service by Mind Map: Develop Service
0.0 stars - reviews range from 0 to 5

Develop Service

WCF Review




Service Contract attribute define saying which application interface will be exposed as a service.  


Operation Contract dictates which methods should be exposed to the external client using this service.


Data Contract attributes defines which type of complex data will be exchanged between the client and the service. They determine which parameters to be serialized.


Windows Communication Foundation (WCF) applications handle error situations by mapping managed exception objects to SOAP fault objects and SOAP fault objects to managed exception objects.

IIS hosted


Automatic activation

the service is not necessary to be running in advance. When any message is received by the service it then launches and fulfills the request. But in case of self hosting the service should always be running.

Process recycling

If IIS finds that a service is not healthy that means if it has memory leaks etc, IIS recycles the process.


to transfer all the searching criteria from client side to server side by calling some web service method, usually "List" method

ExpandFilter Method


Service Implementation





NH Session

Introduction Let’s review some of its funcionalities before asking how we should manage the session: 1. The session manages the persistence of our entities then the session has information about the state of the objects at certain times (when the objects were loaded) 2. The session has a cache, it allows a single instance of each object that we load within it. When we try to get an object which has already been loaded, the session returns us a reference to the same instance of the class. 3. The lazy loading will use the session to get the objects only when they are requested. Then... If we accept the introduction is true then we may say: A. Each object should be loaded and saved in the same session (reason 1). B. The related objects should be loaded in the same session (reason 1 and 2). C. the objects with lazy loading should have the same session (opened) at the time to load the lazy information (reason 2 and 3) unless we use an eager fetching strategy. If we disregard it then we can have an Exception of type LazyLoadingException with the message "no session" or "session was closed" because we just did it, we closed the session ahead of time. D. When an object is modified, it is modified again on the session because it is the same! (reason 2) the changes aren't visible for other sessions until we do a Flush and Commit of the transaction. Only after that, the changes are visible to other sessions. This behavior is the key to know how many sessions are necessary. E. The session should be closed when we don't need the same instance of it (reason 1 and 2, considering A, B and C)  


DAO interfaces make sense in more complex applications, when several persistence services are encapsulate in one persistence layer.





<serviceBehaviors> 6: <behavior name="serviceDebuBehavior"> 7: <serviceDebug includeExceptionDetailInFaults="true" />

Back up sql data or isam data if needed

UnComment Debug config in web.config

turn on CLR exceptions throw flag

Set break point to reproduce