Null reference exception thrown in Sniffer() method of WebUtilHTTPModule

Description

I'm generating nhb from the trunk of the svn tree and I've noticed that I have several issues with a null reference exception being thrown when an IIS application first starts up and serves a page or asmx service. This is on Win 2k3 R2 so IIS6, but also affects VS2008/VS2010 web server ( cassini ) on both WinXp X64 and Win7 X64.
The exception is thrown at the Sniffer method - line 107, trying to call the Configuration property of the bf.BurrowEnvironment object
after stepping out of BurrowEnvironment.cs at line 36 ( public IFrameworkEnvironment BurrowEnvironment property )

The issue after some debugging is that the static field "instance" in the FrameworkEnvironment class is null. For somereason the constructor at line 10 in FrameworkEnvironment object.cs isn't always called.

Opening web.config and saving ( causing an app pool recycle ) solves this, so it's something along the lines of after a recylce everything works pretty well but on first startup A null reference occurs.

I've played with a small ( and possibly dirty patch ) to check if the field instance is null and call the constructor.

Or am I simply missing something simpler?

Environment

None

Attachments

1
  • 28 Jul 2010, 03:43 PM

Activity

Show:

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created July 28, 2010 at 3:43 PM
Updated July 28, 2010 at 3:43 PM
Who's Looking?

Flag notifications