2013-04-29 12 views
8

Ich versuche, ein wirklich einfaches NancyFx-Projekt mit OWIN-Hosting zu erstellen.NancyFx erreicht Modul nicht mit Owin Hosting

Nancy scheint zu laufen, weil ich das 404 erhalte, das mit Nancy standardmäßig kommt, aber keines meiner Module wird jemals erreicht.

Hier ist was ich bisher habe. Es ist wahrscheinlich etwas wirklich offensichtlich.

Startup.cs

public class Startup 
{ 
    public void Configuration(IAppBuilder builder) 
    { 
     builder.UseNancy(); 
    } 
} 

Program.cs

class Program 
{ 
    static void Main(string[] args) 
    { 
     using (WebApplication.Start<Startup>("http://+:8080")) 
     { 
      Console.WriteLine("Press enter to exit"); 
      Console.ReadLine(); 
     } 
    } 
} 

HelloWorld.cs

class HelloWorld : Nancy.NancyModule 
{ 
    public HelloWorld() 
    { 
     Get["/"] = parameters => 
     { 
      return "Hello World!"; 
     }; 
    } 
} 

Danke für die Hilfe im Voraus!

Antwort

15

Sie müssen Ihr Modul veröffentlichen, jetzt ist es privat

+1

Sie, Sir, sind die intelligentesten Menschen am Leben. Ich fühle mich dumm, aber danke :) – Alex

+0

@Alex Sie sind nicht allein in Ihrer Dumbitude. Das hat das gleiche Problem für mich gelöst :-) – biofractal