複数のバインドを追加するときのように、複数のホストヘッダー名に応答する asp.net mvc4 Web API を iis Web サイトに配置します。
誰も私がそれを行うことができる方法を知っていますか? または可能であれば?
私のデフォルトのアプリ(まだコマンドライン)は次のようになります:
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();
}
}