nancy razor first time setup - route not found 404 -
steps took setup project:
- created new asp.net project
- install-package nancy.viewengines.razor
- added views/hello.cshtml (simple hello world html)
- added mainmodule.cs
- hit ctrl-f5 (it returns directory listing)
- change url localhost:41915/hello
then 404 resource not found.
missing?
// mainmodule.cs namespace myproj { using nancy.routing; using nancy; public class mainmodule : nancymodule { public mainmodule(iroutecacheprovider routecacheprovider) { get["/hello"] = parameters => { return view["hello.cshtml"]; }; } } }
you need nancy.hosting.aspnet package too.
Comments
Post a Comment