<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-35403832.post5291513239747695827..comments</id><updated>2011-01-27T09:58:11.075+01:00</updated><category term='C#'/><category term='NAnt-Extensions'/><category term='Visual Studio'/><category term='Continuous Integration'/><category term='jQuery'/><category term='git'/><category term='TeamCity'/><category term='PDFWebViewer.NET'/><category term='.NET General'/><category term='SQL Server'/><category term='AJAX'/><category term='Sitefinity'/><category term='Castle'/><category term='MSBuild'/><category term='Servers'/><category term='ASP.NET MVC'/><category term='ASP.NET'/><title type='text'>Comments on Alanta Developer Notes: Castle: PerWebRequestLifeStyle won’t work from App...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.alanta.nl/feeds/5291513239747695827/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html'/><author><name>Marnix</name><uri>http://www.blogger.com/profile/00913090261390882195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_G_mDY8FPULY/S1Agl88Q1qI/AAAAAAAAAAc/3rqXrGO2sNM/S220/ikke2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-35403832.post-2017712261211539739</id><published>2011-01-27T09:58:11.075+01:00</published><updated>2011-01-27T09:58:11.075+01:00</updated><title type='text'>Looks good Mauricio. Especially since it also has ...</title><content type='html'>Looks good Mauricio. Especially since it also has the contextual life style you commented about on my &lt;a href="http://stackoverflow.com/questions/3370802/limit-instance-lifetime-to-a-single-iteration" rel="nofollow"&gt;Stack Overflow question&lt;/a&gt; a while back.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/2017712261211539739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/2017712261211539739'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1296118691075#c2017712261211539739' title=''/><author><name>Marnix</name><uri>http://www.blogger.com/profile/00913090261390882195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_G_mDY8FPULY/S1Agl88Q1qI/AAAAAAAAAAc/3rqXrGO2sNM/S220/ikke2.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2146392594'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-4082868874247436644</id><published>2011-01-26T23:56:27.727+01:00</published><updated>2011-01-26T23:56:27.727+01:00</updated><title type='text'>A while ago I created a &lt;a href="https://www.ohloh...</title><content type='html'>A while ago I created a &lt;a href="https://www.ohloh.net/p/CastleWindsorLifestyles" rel="nofollow"&gt;contrib project with several lifestyles&lt;/a&gt; not included in stock Windsor (hybrid transient-web included).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/4082868874247436644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/4082868874247436644'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1296082587727#c4082868874247436644' title=''/><author><name>mausch</name><uri>http://www.blogger.com/profile/15247972578064164206</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_O0JK8vpXCXY/S0VmXRKILKI/AAAAAAAACSQ/ldj_FyJCE8w/s1600-R/2c87b8887d870df2747aceb2a44016e0%3Fs%3D128%26d%3Didenticon%26r%3DPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1947820734'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-3526737640456257544</id><published>2010-09-18T14:54:15.816+02:00</published><updated>2010-09-18T14:54:15.816+02:00</updated><title type='text'>As far as I know the position of the Castle team i...</title><content type='html'>As far as I know the position of the Castle team is that the behavior of the PerWebRequest lifestyle is by design. They are not planning to fix or change it.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/3526737640456257544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/3526737640456257544'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1284814455816#c3526737640456257544' title=''/><author><name>Marnix</name><uri>http://www.blogger.com/profile/00913090261390882195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_G_mDY8FPULY/S1Agl88Q1qI/AAAAAAAAAAc/3rqXrGO2sNM/S220/ikke2.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2146392594'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-3029364104966775527</id><published>2010-09-17T17:36:41.034+02:00</published><updated>2010-09-17T17:36:41.034+02:00</updated><title type='text'>Anything new about this issue? I&amp;#39;m using Castl...</title><content type='html'>Anything new about this issue? I&amp;#39;m using Castle 2.5 and in my project your solution doesn&amp;#39;t solve my problem (I can access the container but not the registered components).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/3029364104966775527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/3029364104966775527'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1284737801034#c3029364104966775527' title=''/><author><name>David Aleu</name><uri>http://www.blogger.com/profile/14844275421308491186</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://3.bp.blogspot.com/_YbqVfs29Mqg/TCEtuxNoLXI/AAAAAAAABeg/KmEBA60NcT4/S220/34046_1208009859863_1817197538_393666_1527232_n.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1290932362'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-8989762348207596534</id><published>2010-01-07T10:04:51.534+01:00</published><updated>2010-01-07T10:04:51.534+01:00</updated><title type='text'>Hi Bhoomi,

I&amp;#39;ve updated the demo code to make...</title><content type='html'>Hi Bhoomi,&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve updated the demo code to make it a bit simpler to use. Please download the code again and see if that works for your application.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/8989762348207596534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/8989762348207596534'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1262855091534#c8989762348207596534' title=''/><author><name>Marnix</name><uri>http://www.blogger.com/profile/00913090261390882195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.nixxie.nl/blog/ikke.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2146392594'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-753160060488046986</id><published>2010-01-07T09:42:25.415+01:00</published><updated>2010-01-07T09:42:25.415+01:00</updated><title type='text'></title><content type='html'>This comment has been removed by the author.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/753160060488046986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/753160060488046986'/><author><name>Marnix</name><uri>http://www.blogger.com/profile/00913090261390882195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.nixxie.nl/blog/ikke.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.contentRemoved' value='true'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2146392594'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-5270423590339963647</id><published>2010-01-07T06:10:36.498+01:00</published><updated>2010-01-07T06:10:36.498+01:00</updated><title type='text'>Hi Murki,

Thanks for the code. Yes your code work...</title><content type='html'>Hi Murki,&lt;br /&gt;&lt;br /&gt;Thanks for the code. Yes your code works correctly. &lt;br /&gt;I replicated your Web.Config file but still I am getting the same error that is :&lt;br /&gt;&lt;br /&gt;Looks like you forgot to register the http module Castle.MicroKernel.Lifestyle.PerWebRequestLifestyleModule&lt;br /&gt;Add &amp;#39;&amp;#39; to the  section on your web.config&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It comes from :&lt;br /&gt;ServiceLocator.Current.GetInstance(commandHandler);&lt;br /&gt;&lt;br /&gt;here commandHandler is a generic of type : ICommandHandler&lt;br /&gt;&lt;br /&gt;Any ideas wht&amp;#39;s wrong??&lt;br /&gt;&lt;br /&gt;Thanks again..</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/5270423590339963647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/5270423590339963647'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1262841036498#c5270423590339963647' title=''/><author><name>bhoomi</name><uri>http://www.blogger.com/profile/04135012150453433814</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-651669298'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-238361787519071227</id><published>2010-01-06T10:09:18.593+01:00</published><updated>2010-01-06T10:09:18.593+01:00</updated><title type='text'>Hi Bhoomi,

I&amp;#39;ve created a basic demo applicat...</title><content type='html'>Hi Bhoomi,&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve created a basic demo application that demonstrates my solution and added a link to the blog post. &lt;br /&gt;Please try the application and let me know if this works for you.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/238361787519071227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/238361787519071227'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1262768958593#c238361787519071227' title=''/><author><name>Marnix</name><uri>http://www.blogger.com/profile/00913090261390882195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.nixxie.nl/blog/ikke.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2146392594'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-5546191264124457444</id><published>2010-01-03T18:17:44.825+01:00</published><updated>2010-01-03T18:17:44.825+01:00</updated><title type='text'>Visual Studio 2008.</title><content type='html'>Visual Studio 2008.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/5546191264124457444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/5546191264124457444'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1262539064825#c5546191264124457444' title=''/><author><name>bhoomi</name><uri>http://www.blogger.com/profile/04135012150453433814</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-651669298'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-7913269073555218042</id><published>2010-01-03T16:37:51.722+01:00</published><updated>2010-01-03T16:37:51.722+01:00</updated><title type='text'>Hi Bhoomi,

What version of Visual Studio are you ...</title><content type='html'>Hi Bhoomi,&lt;br /&gt;&lt;br /&gt;What version of Visual Studio are you using?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/7913269073555218042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/7913269073555218042'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1262533071722#c7913269073555218042' title=''/><author><name>Marnix</name><uri>http://www.blogger.com/profile/00913090261390882195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.nixxie.nl/blog/ikke.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2146392594'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-1303820420101964394</id><published>2009-12-31T11:54:41.887+01:00</published><updated>2009-12-31T11:54:41.887+01:00</updated><title type='text'>I am still having the same problem. Tried various ...</title><content type='html'>I am still having the same problem. Tried various things. Implemented your code also. Tried out ploeh&amp;#39;s way also. Nothing seems to work for me. I am using Castle.Windsor 2.0.0.0.&lt;br /&gt;I am running my solution from VS Integrated environment. &lt;br /&gt;&lt;br /&gt;Pl help.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/1303820420101964394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/1303820420101964394'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1262256881887#c1303820420101964394' title=''/><author><name>bhoomi</name><uri>http://www.blogger.com/profile/04135012150453433814</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-651669298'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-7307313761144845338</id><published>2009-11-17T13:49:50.887+01:00</published><updated>2009-11-17T13:49:50.887+01:00</updated><title type='text'>Regarding getting PerWebRequest to work on IIS7, s...</title><content type='html'>Regarding getting PerWebRequest to work on IIS7, see my blog post &lt;a href="http://blog.ploeh.dk/2009/11/17/UsingCastleWindsorsPerWebRequestLifestyleWithASPNETMVCOnIIS7.aspx" rel="nofollow"&gt;Using Castle Windsor&amp;#39;s PerWebRequest lifestyle with ASP.NET MVC on IIS7&lt;/a&gt;.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/7307313761144845338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/7307313761144845338'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1258462190887#c7307313761144845338' title=''/><author><name>ploeh</name><uri>http://www.blogger.com/profile/08123428416238770895</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1507668120'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-7763849730003890276</id><published>2009-09-30T18:01:26.949+02:00</published><updated>2009-09-30T18:01:26.949+02:00</updated><title type='text'>Hi Mausch,

Good point. I haven&amp;#39;t had a chance...</title><content type='html'>Hi Mausch,&lt;br /&gt;&lt;br /&gt;Good point. I haven&amp;#39;t had a chance to report the issue so I&amp;#39;ve gone and done it right away.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Marnix</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/7763849730003890276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/7763849730003890276'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1254326486949#c7763849730003890276' title=''/><author><name>Marnix</name><uri>http://www.blogger.com/profile/00913090261390882195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.nixxie.nl/blog/ikke.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2146392594'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-7288314936477380389</id><published>2009-09-30T17:20:50.406+02:00</published><updated>2009-09-30T17:20:50.406+02:00</updated><title type='text'>Hi Marnix, did you try asking on the castle users ...</title><content type='html'>Hi Marnix, did you try asking on the castle users group? If this is bug it should be fixed.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/7288314936477380389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/7288314936477380389'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1254324050406#c7288314936477380389' title=''/><author><name>mausch</name><uri>http://www.blogger.com/profile/15247972578064164206</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='23' height='32' src='http://img167.imageshack.us/img167/86/new2el1.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1947820734'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-1087683116384393599</id><published>2009-07-23T09:28:25.344+02:00</published><updated>2009-07-23T09:28:25.344+02:00</updated><title type='text'>Hi Murki,

I haven&amp;#39;t read the book, but I thin...</title><content type='html'>Hi Murki,&lt;br /&gt;&lt;br /&gt;I haven&amp;#39;t read the book, but I think I agree with the author.&lt;br /&gt;&lt;br /&gt;For simple applications where you have a single point of interaction with the datacontext in each request, transient lifestyle would do just fine. When things get more complicated problems will start to appear. For example, I use a filter to inject the current user into controller methods:&lt;br /&gt;&lt;br /&gt;ActionResult DoStuff( [CurrentUser] User current ){&lt;br /&gt;  myRepo.DoStuffWithUser( current );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The filter retrieves the current user object from the database. In the action method the current user is passed to a repository to do some operations on it.&lt;br /&gt;If the datacontext has a transient lifestyle the filter and the repository used here would each have their own instance of the datacontext. Using an object retrieved by one datacontext to perform database operations in another will cause problems because datacontexts track their objects. The second datacontext does not &amp;#39;own&amp;#39; the object retrieved by the first datacontext and will either throw an exception or try to insert it (again!).&lt;br /&gt;&lt;br /&gt;PerWebRequest lifestyle will prevent these problems because both the filter and the repository would get the same instance of the datacontext.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/1087683116384393599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/1087683116384393599'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1248334105344#c1087683116384393599' title=''/><author><name>Marnix</name><uri>http://www.blogger.com/profile/00913090261390882195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.nixxie.nl/blog/ikke.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2146392594'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-1474646274740544780</id><published>2009-07-23T01:07:11.764+02:00</published><updated>2009-07-23T01:07:11.764+02:00</updated><title type='text'>Hi Marnix,

Yeah, I&amp;#39;m basing some parts of my ...</title><content type='html'>Hi Marnix,&lt;br /&gt;&lt;br /&gt;Yeah, I&amp;#39;m basing some parts of my design on the suggestions of the book of &amp;quot;Pro ASP.NET MVC Framework&amp;quot; about using a PerWebRequest lifestyle in conjunction with Linq 2 Sql DataContext, but there the author contrast it against the default of &amp;quot;Singleton&amp;quot; which makes a lot of sense. Still I can&amp;#39;t see how using a Transient lifestyle would make impossible to still use the DataContext, it would be an overkill maybe, but I don&amp;#39;t think &amp;quot;impossible&amp;quot;.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/1474646274740544780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/1474646274740544780'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1248304031764#c1474646274740544780' title=''/><author><name>murki</name><uri>http://www.blogger.com/profile/09176271789880754366</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1174665269'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-4095723463545483635</id><published>2009-07-15T18:16:41.348+02:00</published><updated>2009-07-15T18:16:41.348+02:00</updated><title type='text'>Hi Murki,

A transient lifestyle would mean that e...</title><content type='html'>Hi Murki,&lt;br /&gt;&lt;br /&gt;A transient lifestyle would mean that every time you resolve a service a new instance is created. That may not be a problem in itself but needless creation of objects is a waste of server resources (mostly memory).&lt;br /&gt;Also, I tend to use PerWebRequest lifestyle for things like a Linq DataContext. This ensures that every change to the database happens within the same context and all objects retrieved from the database are tracked by the same datacontext.&lt;br /&gt;This would be impossible with a transient lifestyle.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/4095723463545483635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/4095723463545483635'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1247674601348#c4095723463545483635' title=''/><author><name>Marnix</name><uri>http://www.blogger.com/profile/00913090261390882195</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='26' height='32' src='http://www.nixxie.nl/blog/ikke.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2146392594'/></entry><entry><id>tag:blogger.com,1999:blog-35403832.post-4796716168615150364</id><published>2009-07-15T17:30:35.432+02:00</published><updated>2009-07-15T17:30:35.432+02:00</updated><title type='text'>Hey! Thanks for your great post, you&amp;#39;re the on...</title><content type='html'>Hey! Thanks for your great post, you&amp;#39;re the only person I&amp;#39;ve seen addressing this problem, even though I have taken a different approach, do you know what would be the implications of using a Transient lifestyle instead of a PerWebRequest?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/4796716168615150364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/35403832/5291513239747695827/comments/default/4796716168615150364'/><link rel='alternate' type='text/html' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html?showComment=1247671835432#c4796716168615150364' title=''/><author><name>murki</name><uri>http://www.blogger.com/profile/09176271789880754366</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.alanta.nl/2009/07/castle-perwebrequestlifestyle-wont-work.html' ref='tag:blogger.com,1999:blog-35403832.post-5291513239747695827' source='http://www.blogger.com/feeds/35403832/posts/default/5291513239747695827' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1174665269'/></entry></feed>
