Quick, dirty and unrehearsed. Just show how to set up MR without external configuration, how to get Windsor integration enabled and setting up routing. Created to test Screenflow.
MR and Windsor set up screencast
May 26th, 2008
Categories: Castle, MonoRail, Windsor | Top Of Page | 12 Comments » |
May 26th, 2008 at 11:30 pm
Great screen cast! Thanks for sharing it. Any chance we’ll get to see more of these from you in the future?
Shane
May 26th, 2008 at 11:46 pm
What topic?
May 27th, 2008 at 1:55 am
Great screen cast, however the sound quality is too low it would be much much better is you speak louder :)
May 27th, 2008 at 9:57 am
Lets see if I can put together a wish list of things I’ve researched lately that would have benefited from a screencast…
*Repository pattern using ActiveRecord.
*Advanced usages of Windsor/MicroKernel with plenty of time doing facilities and advanced customization.
*Example of (near) production quality Authentication/Authorization of controllers/actions using filters in MonoRail.
*Neat usages of Dynamic Proxy.
This one is a nice to have:
*Live coding session of donjon.
Shane
May 27th, 2008 at 4:24 pm
@Shanebush: I’ve just posted an article on the subject of authorization and authentication with monorail filters and a custom attribute to mark controller actions. Take a look at part 6 of my series here:
http://pixelbugs.wordpress.com/2008/05/26/6-adding-security/
Or you can use the built in security of .NET with the following (depending on your needs):
http://www.castleproject.org/monorail/documentation/trunk/usersguide/authentication.html
http://www.castleproject.org/monorail/documentation/trunk/viewcomponents/security.html
Hope that helps.
May 27th, 2008 at 11:55 pm
@Andy:
Holy passwords Batman! Thanks for that link. I’ll review it post-haste!
My implementation is pretty much straight out of the userguide that you link to. Saving custom IPrincipal to Session. Haven’t worked out yet how to to use cookies to store FormsAuthenticationTicket and retrieve it correctly in the Filter. I know I’m missing something stupid. Now that I’m inspired again to look at it; if I can’t get it working, maybe I’ll post about it in the forums.
Thanks again for the link though!
May 28th, 2008 at 12:21 am
Here’s the way I want it to work btw:
Upon login/authentication, a User object is serialized (very small class that implements IPrincipal) into the userdata of a FormsAuthenticationTicket. Call encrypt on ticket, and store it as cookie. Then redirect to calling page.
Calling page executes filter, checks for cookie, if there, reads/unencrypts ticket/deserializes userdata as ‘user’ and sets context.CurrentUser = user; and System.Threading.Thread.CurrentPrincipal = user;
The top part up there is working great. The 2nd paragraph is where I’m having some issues. Any advice on whether this is a good approach or not?
@hammett: Sorry for hijacking the blog comments!
May 29th, 2008 at 10:39 am
“*Repository pattern using ActiveRecord.”
I’d love a screencast on this one. And by the way, thanks for this current screencast, hammett. Came at the perfect time. I was trying to figure out Windsor auto-registration.
May 29th, 2008 at 6:23 pm
Great screen cast! I like that you show how to use MR without endless sessions of config file tweaking.
I, too, hope to see more screen casts. For beginners MR (and the rest of the castle stack) is quite a massive API. It would therefore be cool if you’d show some best practices you would suggest when dealing with common problems in MR/castle. Some kind of cook book as a guidance.
Regards,
Andre
June 2nd, 2008 at 4:43 am
I see difference with this screencast:
Me) Routing Module finded in Castle.MonoRail.Framework
Screencast)Routing is in Castle.MonoRail.Framework.Routing.RoutingEx
Why? I used RC3.
June 2nd, 2008 at 10:24 am
Get a recent build from builds.castleproject.org
June 3rd, 2008 at 12:47 am
[...] MR and Windsor set up screencast – I am not familiar with Binsor just yet this video does help. [...]