nancy razor first time setup - route not found 404 -


steps took setup project:

  1. created new asp.net project
  2. install-package nancy.viewengines.razor
  3. added views/hello.cshtml (simple hello world html)
  4. added mainmodule.cs
  5. hit ctrl-f5 (it returns directory listing)
  6. 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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -