[Mono-bugs] [Bug 620411] RewritePath crashes with an unidentified null reference exeption in PostAcquireRequestState

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 8 08:55:27 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=620411

http://bugzilla.novell.com/show_bug.cgi?id=620411#c8


--- Comment #8 from Stefan Winkler <s.winkler at studdex.com> 2010-07-08 12:55:26 UTC ---
That hint was very helpful. I did some research based on that and I found out
that HttpContext.Current.CurrentHandler is actually always null in
Application_BeginRequest (the EventListener defined in global.asax where the
rewriting happens), because it is not initialized at that stage of the request
cycle. I made some tests with the old svn revision that still works and even
there it is null, yet nothing crashes. The exception is only thrown after that
totally unrelated "@ Import"-change was made to the mentioned aspx page that
uses a runat="server"-script block instead of a codebehind file and it remained
broken even after we undid that change.

Of course that makes the issue even more mysterious, I mean, how can it not
crash with the old version when CurrentHandler is null and the null-check is
missing in ScriptModule? Apparently by not even attempting to access it, but
then why did this change after such a small change was made?

I will try and check if it works with the attachment you provided, but I'm not
quite sure how to use it. At our company we're using mod_mono on our web
servers (while developing our web application on Windows using Visual Studio),
but we've always used the current stable version and never compiled one
ourselves. Could you email me some tutorial links?

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list