|Nancy 0.9 & RazorViewEngine discovery / blank pages problem [And solution]||Chris Schroeder||2/18/12 4:27 PM|
I have two projects
# TestProjectLib that contains all my code and logic, NancyModule etc. it also reference Nancy, Nancy.Hosting.Self and Nancy.ViewEngines.Razor.
# TestProject that is a simple console app that doesn't reference any Nancy stuff.
It only reference TestProjectLib and creates/starts a TestProjectLib.AdminWebHost class that internally starts a NancyHost.
When I open the browser and go to the url I just get blank pages.
But if I create a dummy instance of RazorViewEngine in my AdminWebHost before creating/starting NancyHost
or do a container.Register<RazorViewEngine>() in a custom bootstrapper it works.
Alt Solution to make Nancy discover the viewengine :
Nancy discovers the viewengine and I can remove my custom BootStrapper.
|Re: Nancy 0.9 & RazorViewEngine discovery / blank pages problem [And solution]||Andreas Håkansson||2/19/12 1:18 AM|
The view engine should be referenced by the main application, in your case TestProject. The reason is that the engine needs to be loaded into the appdomain so that Nancy can discover it and wire it up.
|Re: Nancy 0.9 & RazorViewEngine discovery / blank pages problem [And solution]||Vadim Abdrashitov||2/21/12 9:48 AM|
Hi! A have this problem too (blank page), but this solution not work for me.
P.S.: For hosting I'm using asp.net web app.
|unk...@googlegroups.com||2/21/12 9:58 AM||<This message has been deleted.>|
|Re: [nancy-dev] Re: Nancy 0.9 & RazorViewEngine discovery / blank pages problem [And solution]||Andreas Håkansson||3/15/12 3:23 AM|
Vadim, did you solve your problem?