Ajax request with custom header sent to Web API server with CORS enabled
问题 I'm trying to get a Web API webservice setup correctly to use CORS but haven't been having much luck with it lately. I have an html page from a mobile app using an ajax request to fetch some data: Webservices.GetUserLevel = function() { var userLevel = null; $.ajax({ url: _CONNECTION_STRING + "getuserlevel/" + _USER_PIN, contentType:'application/json; charset=utf-8', type: 'GET', async: false, cache: false, crossDomain: true, data: { BlackberryPin: _USER_PIN }, beforeSend: function(xhr) { xhr