Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.Net WebAPI Delete verb not working
    primarykey
    data
    text
    <p>I'm using IIS 7.5 with asp.net webapi to do a delete for a record id. I can get it to work in Safari, but not Firefox. Here's an image of the request/response for the jQuery Ajax submission:</p> <p><a href="http://screencast.com/t/Ckls9nO8D" rel="nofollow">http://screencast.com/t/Ckls9nO8D</a></p> <p>Here's my code snippet for my jQuery Delete submission:</p> <pre><code> var deleteGame = function(gameId) { var d = $.Deferred(); var url = Enum.RootUrl + Enum.DeleteGameUrl + gameId; jQuery.support.cors = true; $.ajax( { url: url, type: 'Delete', cache: false, crossDomain: true, processData: true, success: function () { d.resolve(); }, error: function(XMLHttpRequest, textStatus, errorThrown) { //alert("error happened AGAIN:\n" + JSON.stringify(XMLHttpRequest) ); } }); return d.promise(); }; </code></pre> <p>here's the generated URL for jquery submission: <a href="http://local.guessalist.com/api/game/46" rel="nofollow">http://local.guessalist.com/api/game/46</a></p> <p>I'm not sure why it works in Safari but not Firefox. Please help.</p> <p>It appears Access-Control-Request-Headers is missing from Request Headers. I'm not sure if this is the cause of the problem.</p> <p>After playing around with this in Safari and Chrome, I'm getting "Refused to set unsafe header "Access-Control-Request-Headers" OPTIONS <a href="http://local.guessalist.com/api/game/64" rel="nofollow">http://local.guessalist.com/api/game/64</a> 405 (Method Not Allowed)" error in each browser via the browser's console, but the delete operation is allowed to continue. Not sure what I'm doing here. Any advice would be greatly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload