I'm working on a WCF service (using the great WCF facility), and having issue with managing the sessionscope.
I'm using AR facility as well and set it to isWeb="false", but getting scope disposed exception with lazy loaded entities. I took a look at the post from Eric Hauser on the matter: http://erichauser.net/2008/08/06/activerecord-session-scope-and-wcf-redux/ I'm looking for some help to enable the classes seen here (implementing IEndpointBehavior and IDispatchMessageInspector) via (preferably) the configuration file or straight programmatic configuration. I'm using http://msdn.microsoft.com/en-us/library/system.servicemodel.description.iendpointbehavior.aspx for reference to set the configuration which look like this: <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="basicwebservice_behaviour"> <serviceDebug includeExceptionDetailInFaults="true"/> <serviceMetadata httpGetEnabled="true"/> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="withActiveRecordScopeManagement"> <activeRecordScopeManagement /> <!-- this is not right --> </behavior> </endpointBehaviors> </behaviors> <extensions> <behaviorExtensions> <add name="activeRecordScopeManagement" type="***.WcfPlumbing.ARDispatchMessageInspector, ***.WcfPlumbing" /> </behaviorExtensions> </extensions> <bindings> <basicHttpBinding> <binding name="default_httpbinding"></binding> </basicHttpBinding> </bindings> <services> <service behaviorConfiguration="basicwebservice_behaviour" name="****FooService" > <endpoint binding="basicHttpBinding" bindingConfiguration="default_httpbinding" contract="****IFooServiceContract" behaviorConfiguration="withActiveRecordScopeManagement" /> </service> </services> </system.serviceModel> this won't work with an exception System.Configuration.ConfigurationErrorsException: Invalid element in configuration. The extension 'activeRecordScopeManagement' does not derive from correct extension base type 'System.ServiceModel.Configuration.BehaviorExtensionElement'. I suppose the behaviorExtension registration is wrong, any idea how I would declare that? I'm sorry because the subject has been hashed many times, but some help with my issue is welcome Best regards --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
