I know the use of WCF in SA is deprecated because it will move to SA Contrib. But until it has, I guess I have to use the support in SA.
That said, I have a problem with the underlying NHibernate session being closed after calling a WCF service. My repository's DbContext.Session is closed after the first call so I cannot call my service more than once during a single HTTP request.
I've set up WCF in my project based on the Northwind sample application. The sample only calls a WCF service once per request so this problem doesn't show up there. The problem is easily reproduced though, by duplicating the following line in the TerritoriesController:
territories = territoriesWcfService.GetTerritories();
This throws an ObjectDisposedException: "Session is closed! Object name: 'ISession'".
Any ideas?