PreFlight Request 404 not found .net web api ; response to preflight request doesn't pass access control check: it does not have http ok status

Try to enable from the web.config file under <system.webserver></system.webserver> like so:

        <add name="Access-Control-Allow-Origin" value="*" />
        <add name="Access-Control-Allow-Credentials" value="true"/>
        <add name="Access-Control-Allow-Headers" value="Content-Type" />
        <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, OPTIONS" />

To handle the preflight request error add the line below in the <handlers></handlers> tags:

<add name="OPTIONSVerbHandler" path="*" verb="OPTIONS" modules="ProtocolSupportModule" requireAccess="None" responseBufferLimit="4194304" />

Then in the  Global.asax file, add the following method:

protected void Application_BeginRequest(object sender, EventArgs e)
  if (HttpContext.Current.Request.HttpMethod == "OPTIONS")