static void Main(string[] args) { Trace.Listeners.Add(new ConsoleTraceListener()); var host = new HttpListenerBasedHost("http://localhost:8080/"); host.Add(DefaultMethodBasedCommandFactory.GetCommandsFor(typeof(Controller))); host.Pipeline.AddFilterFirst("ConsoleLog", typeof(RequestConsoleLogFilter)); host.Pipeline.AddFilterAfter("Authentication", typeof(AuthenticationFilter), "ConsoleLog"); host.Add(new DummyCommand()); host.OpenAndWaitForever(); }
private static void Main(string[] args) { Trace.Listeners.Add(new ConsoleTraceListener()); Init(); var host = new HttpListenerBasedHost("http://localhost:8080/"); host.Add(DefaultMethodBasedCommandFactory.GetCommandsFor( typeof (RootController), typeof (FucController), typeof (ProposalController))); host.Pipeline.AddFilterFirst("Authentication", typeof(AuthenticationFilter)); host.Pipeline.AddFilterAfter("Authorization", typeof(AuthorizationFilter), "Authentication"); host.OpenAndWaitForever(); }