Hi,
Apparently, the Ninject DonJon bug tracker is dead, cant login with my open id, so I'll post this bug here.
Problem:
Object reference not set to an instance of an object.
Occurs inside Ninject.Core.Infrastrcutre.DebugInfo : ShouldIgnoreType(Type type)
The issue arises when you have an ASP.NET website, and your code behind page code has no namespace.
Typically, website apps have code behind like:
public partial class MyPage : Page{
}
with no namespace defined in the code behind page.
So, if there is an Ninject configuration error, or if Ninject cannot find a binding, Ninject attempts to print debug info, but the call to "return type.Namespace.StartsWith" causes a NullReference exception because as it crawls up the stack, and encounters the Page control that is currently processing request that has no namespace.
Workaround:
Fire up the debugger, and set a breakpoint on Line 156 in DebugInfo.cs and move the program counter off the offending line of code and resume to find the error.
It would be great to have better integration support in ASP.NET.
Thanks,
Brian
----------------------------------------------
Brian Chavez
Bit Armory, Inc.
http://www.bitarmory.com