Our AngularJs WebApp communicates CORS CRUD operations against a WebApi service hosted in IIS that is SSL, and requires Certificates. All Verbs - GET, POST, PUT, DELETE, work in Chrome, but... IE11 only GET & POST work. The DELETE & PUT always returns an Aborted Preflight and "Access Denied".
On our WebApi side, we have enabled CORS like this:
var webApiConfig = new HttpConfiguration();
webApiConfig.formatters.JsonFormatters.SupportedMediaTypes.Add(new System.Net.Http.Headers.MediaTypeHeaderValue("text/plain"));
webApiConfig.formatters.JsonFormatters.SupportedMediaTypes.Add(new System.Net.Http.Headers.MediaTypeHeaderValue("text/plain"));
SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
webApiConfig.EnableCors(new EnableCorsAttribute("*","*","*","*"){ SupportsCredentials=true});
On the Angular in the CONFIG section of the app, we intercept the $httpProvider and add headers like so:
$httpProvider.defaults.withCredentials = true;
$httpProvider.defaults.headers.post['Content-Type'] = 'text/plain';
$httpProvider.defaults.headers.put['Content-Type'] = 'text/plain';
Then we would call
$http.delete(urlPrefix + '/api/members/' + id)
.then(function (res) {
return res.data;
});
Any help with this would be most appreciated.