i what to put my asp.net mvc4 web api responding to multiple hostheader names like when we add multiple bindings do iis website.
does anyone know how can i do it? or if is it possible?
my default app (still a commandline) looks like this:
static void Main(string[] args)
{
_config = new HttpSelfHostConfiguration("http://localhost:9090");
_config.Routes.MapHttpRoute(
"API Default", "{controller}/{id}",
new { id = RouteParameter.Optional });
using (HttpSelfHostServer server = new HttpSelfHostServer(_config))
{
server.OpenAsync().Wait();
Console.WriteLine("Press Enter to quit.");
Console.ReadLine();
}
}