1

recently I downloaded the latest sources from fubumvc. I startet the "HelloWorld" sample for a little warm up. Unfortunately everytime a NullReferenceException is thrown by the ServiceLocator in the FubuPage class. First I thought the App-Start might not might not run properly but that's not it...

Anybody any ideas?

Thanks

-jan

Line 35:         public FubuPage()
Line 36:         {
Line 37:             _services.OnMissing = type => { return ServiceLocator.GetInstance(type); };
Line 38:         }
Line 39:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

user333896
  • 33
  • 2
  • 1
    Jan, there's not enough context here. It looks like your view is being executed directly by ASP.NET and outside of FubuMVC. What URL are you using? Are you calling the .aspx directly (i.e. server/foo/bar.aspx)? – chadmyers Jun 28 '10 at 13:33
  • Hi Chad, you are completely right. I startet it in cassini using the .aspx directly as startpage! I corrected it and now it's running fine. Thank you, next time i will be more specific or just don't make such faulty mistakes :-) – user333896 Jul 14 '10 at 20:28

1 Answers1

1

Based on the comments above, it looks like you were hitting a URL with the ".aspx" extension on it which executes the view as a classic ASP.NET WebForms request and bypasses FubuMVC (and it would bypass ASP.NET MVC as well).

Make sure not to put ".aspx" on the end of your request URLs in the address bar in the browser so that you'll be executing FubuMVC routes and not WebForms requests.

chadmyers
  • 3,800
  • 21
  • 29