I have three applications in my architecture.  

They are on the same server but having different port numbers. 

```
A - Token Application (port 4444) - Asp.net WebApi
B - API Application   (port 3333) - Asp.net WebApi
C - UI Application    (port 2222) - AngularJS App.

```

The application flow is like below

1- The UI project gets the token from Token Application (It requires Windows Auth.) 
Ex : `awxrsdsaWeffs12da`

2- UI application puts this token to a custom header which is named as "accessToken"

Ex : accessToken : `awxrsdsaWeffs12da`

3- UI application sends a request to API Application
Ex: `http:myaddress:3333/api/TheRestServiceHere`

UI application gets 401 Error. 
Which sends OPTIONS method. (I guess preflight issue)

In my web api project I enabled Cors like this below. 

```
public static void Register(HttpConfiguration config)
{
            ....

            //CORS
            var cors = new EnableCorsAttribute("*", "*", "*");
            config.EnableCors(cors);

            ....
}

```

Config

```
   public static class WebApiConfig
    {
        public static void Register(HttpConfiguration config)
        {

            //CORS
            var cors = new EnableCorsAttribute("*", "*", "*");
            config.EnableCors();

            // Web API routes
            config.MapHttpAttributeRoutes();

            config.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
            );

            var json = config.Formatters.JsonFormatter;
            json.SerializerSettings.PreserveReferencesHandling = PreserveReferencesHandling.None;
            json.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
            json.SerializerSettings.Formatting = Formatting.None;
            json.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();

            config.Formatters.Remove(config.Formatters.XmlFormatter);
        }
    }

```

So I am looking for a solution to call API application (B) controllers
and get 200 :)

Regards