Ok, I am quite confused on what I need to do here. So I have successfully created an ASP.NET Web API web service. I have tested it locally and it works. I also have deployed it to our IIS server. Testing it locally on the server it works. So now my big question is how do I bind this service to an existing domain? So for example, if we have http://test.mysite.com how can I have my new API service be bound to that site? My API service is a POST where someone will upload an image file to our service, our service will grab that file and place it on our server, and then the service will return success/failure back to user. So I change the ajaxRequest POST from looking locally to:

            // Make Ajax request with the contentType = false, and procesDate = false
            var ajaxRequest = $.ajax({
                type: "POST",
                url: "http://test.mysite.com:8080/api/fileupload/uploadfile",
                contentType: false,
                processData: false,
                data: data
            });

I keep getting an error about enabling CORS. I tried following instructions to do that but still get the same error. What am I missing? Do I have to do something special to "bind" this service to my http://test.mysite.com:8080? Please help!!!!

Thanks,

Brad

Related posts

Recent Viewed