protected void Application_Start(object sender, EventArgs e) { IocConfig.RegisterDependencyResolver(GlobalConfiguration.Configuration); WebApiConfig.Register(GlobalConfiguration.Configuration); DtoMapperConfig.CreateMaps(); CorsConfig.RegisterCors(GlobalConfiguration.Configuration); }
public void Initialize() { var configuration = new HttpConfiguration(); IocConfig.RegisterDependencyResolver(configuration); WebApiConfig.Register(configuration); DtoMapperConfig.CreateMaps(); server = new HttpServer(configuration); // This test runs under the context of my user // account (Windows Identity) and hence I clear that Thread.CurrentPrincipal = new GenericPrincipal( new GenericIdentity(String.Empty), null); }
static void Main(string[] args) { //var configuration = new HttpSelfHostConfiguration("http://localhost:8086"); var configuration = new MySelfHostConfiguration("https://localhost:8086"); WebApiConfig.Register(configuration); DtoMapperConfig.CreateMaps(); IocConfig.RegisterDependencyResolver(configuration); using (HttpSelfHostServer server = new HttpSelfHostServer(configuration)) { server.OpenAsync().Wait(); Console.WriteLine("Press Enter to terminate the server..."); Console.ReadLine(); } }
protected void Application_Start(object sender, EventArgs e) { WebApiConfig.Register(GlobalConfiguration.Configuration); DtoMapperConfig.CreateMaps(); }
public void Initialize() { DtoMapperConfig.CreateMaps(); }