I have a windows service that is hosting Web API. There is a requirement now that a client will be submitting client certificate for each request. How do I handle the client certificates in self hosted web API?
var config = new HttpsSelfHostConfiguration(uri);
config.Formatters.XmlFormatter.UseXmlSerializer = true;
config.MaxReceivedMessageSize = int.MaxValue;
config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;
config.Routes.MapHttpRoute(controllerName, "api/MyController/{action}/{id}", new { controller = controllerName, id = RouteParameter.Optional });
var server = new HttpSelfHostServer(config);
server.OpenAsync().Wait();