Passing client context using Unity in WCF service application?

Read Andrew Oakley's Blog on WCF specific lifetime managers He creates a UnityOperationContextLifetimeManager: we came up with the idea to build a Unity lifetime manager tied to WCF's OperationContext. That way, our container objects would live only for the lifetime of the request Configure your context class with that lifetime manager and then just resolve it. It should give you an "operation singleton.

Read Andrew Oakley's Blog on WCF specific lifetime managers. He creates a UnityOperationContextLifetimeManager: we came up with the idea to build a Unity lifetime manager tied to WCF's OperationContext. That way, our container objects would live only for the lifetime of the request... Configure your context class with that lifetime manager and then just resolve it.It should give you an "operation singleton".

Too funny. I was playing around with the different LifetimeManagers last evening in response to JohnC's suggestion and ran into the same problem described in the blog post. I will take a look at the sample code and see how it works.

– SonOfPirate Oct 13 at 17:47 One thing to notice: The code isn't meant as a sample. Its meant to be used. Hence the "working on getting these added to Unity Contrib".

– ErnieL Oct 13 at 20:06.

Sounds like you need a Unity LifetimeManager. See this SO question or this MSDN article.

Interesting idea. Can you elaborate on how you'd make it work? I'm already using the TransientLifetimeManager for the service class.

– SonOfPirate Oct 13 at 0:53.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions