Web API 2 has the CORS support out of the Box. Its available as attributes called EnabledCors and DisableCors. As an attribute it can be extended based on our requirement, we can easily bring the feature to allow or disallow specific external sites to share resource. Cross-Origin attribute can be enabled globally on WebApiConfig as…