And I can confirm that OperationContext.Current is null What's strange is that it works fine with Castle 2.5 ... this version may fall back on a Transient lifestyle if OperationContext.Current is null ?
On Thu, May 17, 2012 at 5:15 PM, Fabrice <[email protected]> wrote: > I was just replying to my own message when I see your answer :-) > > Indeed I just finished a test project and it only happend if the component > is resolved in the IAuthorizationPolicy (or I suppose also in the > Validator). It works fine if used in the operation method. > Is it a bug ? do you want the test project ? > > In fact how could I configure the container so that some specific > component (the Validator) use Transient lifestyle, and all other use > PerWcfOperation ? I really need to use a PerWcfOperation to avoid db lock > when several component update the db. In this case, they all share the same > connection, otherwise (Transient) they all have a different connection and > lock each other. > > Is it possible to create a custom lifestyle that try a PerWcfOperation > and, if it doesn't works, fall back on the Transient lifestyle ? > > Thank you for your help > Fabrice > > > > On Thu, May 17, 2012 at 5:07 PM, Craig Neuwirt <[email protected]> wrote: > >> I don't believe an OperationContext.Current is available at the point >> where a custom UserNamePasswordValidator is called. This could be why no >> scope could be obtained. Is it possible to choose a different lifestyle. >> >> -craig >> >> On May 14, 2012, at 8:04 AM, Fabrice wrote: >> >> >> Hello, >> >> I've a problem with WcfPerOperation lifestyle after upgraded my project >> from Castle 2.5.2 to Castle 3.0 >> I've posted on StackOverflow and only after I thinked it could be better >> to post here... >> >> But anyway here is the link: >> http://stackoverflow.com/questions/10579236/componentresolutionexception-after-upgrading-to-castle-3-0 >> >> Thank you for any help! >> Fabrice >> >> -- >> 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. >> >> >> -- >> 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. >> > > -- 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.
