Hi Tomek,

Thanks for raising these issues.
Can you please raise bug reports for each issue found at
http://issues.castleproject.org

And if you want to have a go at fixing any of these issues please make
sure you follow 
http://stw.castleproject.org/How-to-submit-a-fix-to-any-Castle-Project.ashx

Cheers
John



On Feb 14, 2:09 am, Tomek Pluskiewicz <[email protected]> wrote:
> Hi
>
> Today I've experienced a weird behaviuor from MonoRail while using
> elements mention in the topic.
>
> Imagine the following:
> 1. I have a custom extension, which loads menu items from
> configuration and then uses UrlHelper to build links for those items.
> 2. On one of the pages I use ActionHelper's Render method
> 3. The whole thing explodes inside Controller#DisposeFilters() with
> NullReferenceExpception
>
> I spent some time looking into that issue and it seems the problem
> lies inside ActionHelper.
> 1. ActionHelper creates UrlInfo without supplying AppVirtualDir, which
> causes UrlBuilder to fail inside extension
> 2. Because extensions fire before other MonoRail steps, the disposing
> of Controller happens before it has been contextualized
> 3. The above is the reason of NullRefereneException (the null is in
> fact Controller#context)
>
> There are a few weak spots I thnk should be fixed:
> 1. Dispose should be invulnerable to NullReferenceException. Extension
> failing is a good reason not to assume, that all Controller's
> properties will be set. Other solution would be actually
> contextualizing *before* anything could go wrong
> 2. Another UrlInfo constructor should be used for ActionHelper. That
> is the direct reason for my problem. I'm not sure how to supply all
> the required parameters correctly though.
> 3. Last issue is exception handling inside MonoRail, which hasn't just
> once failed me. This is not the first time I've encountered MonoRail
> display not the actual exception, which tends to be quite misleading.
> It took me quite a lot of digging to figure out what's going on.
>
> On the other hand thank god MR is open source. I doubt I would be able
> to find my solution for a simmilari issue with ASP.NET... ;)

-- 
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.

Reply via email to