WCF Preflight OPTIONS request *** IE10, VS2012, Javascript, $AJAX *** RRS feed

  • Question

  • Hi,, is there anybody able to offer some advice on what is wrong here ???. Pasted below are request and response headers (fiddler) for a Cross Domain request from IE10/Javascript/Jquery Ajax call to a WCF service. As fas I can see I am returning all required headers to a Browser OPTIONS preflight command (as documented in thousands of places, but apparently not enough: still 405 method not allowed) . Ps headers right at the bottom, (having problems with spacing)

    <--- Request Headers ----------->


    Accept: */*

    Origin: http://localhost:51784

    Access-Control-Request-Method: POST

    Access-Control-Request-Headers: content-type, accept

    Accept-Encoding: gzip, deflate

    User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)


    Content-Length: 0

    DNT: 1

    Connection: Keep-Alive

    Pragma: no-cache

    <------ Response Headers ----------->

    HTTP/1.1 405 Method Not Allowed

    Allow: POST

    Content-Length: 1565

    Content-Type: text/html; charset=UTF-8

    Server: Microsoft-HTTPAPI/2.0

    Access-Control-Allow-Origin: *

    Access-Control-Allow-Method: POST, GET, OPTIONS

    Access-Control-Allow-Headers: Accept, Content-Type

    Access-Control-Max-Age: 172800

    Date: Mon, 21 Jan 2013 17:21:35 GMT

    <?xml version="1.0" encoding="utf-8"?>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

    <html xmlns="">



        <style>BODY { color: #000000; background-color: white; font-family: Verdana; margin- margin- } #content { margin- font-size: .70em; padding-bottom: 2em; } A:link { color: #336699; font-weight: bold; text-decoration: underline; } A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; } A:active { color: #336699; font-weight: bold; text-decoration: underline; } .heading1 { background-color: #003366; border-bottom: #336699 6px solid; color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal;margin: 0em 0em 10px -20px; padding-bottom: 8px; padding-padding-} pre { font-size:small; background-color: #e5e5cc; padding: 5px; font-family: Courier New; margin- border: 1px #f0f0e0 solid; white-space: pre-wrap; white-space: -pre-wrap; word-wrap: break-word; } table { border-collapse: collapse; border-spacing: 0px; font-family: Verdana;} table th { border-right: 2px white solid; border-bottom: 2px white solid; font-weight: bold; background-color: #cecf9c;} table td { border-right: 2px white solid; border-bottom: 2px white solid; background-color: #e5e5cc;}</style>



        <div id="content">

          <p class="heading1">Service</p>

          <p>Method not allowed.</p>





    Monday, January 21, 2013 5:36 PM