Note that there are some explanatory texts on larger screens.

plurals
  1. PONull parameters in MVC action from jQuery ajax call during navigation (IE only)
    primarykey
    data
    text
    <p>I am a programmer on an MVC/ajax project that receives significant traffic from its customers. We've been seeing one or two isolated instances (per day) of a controller action not receiving parameters from the client.</p> <p>Long story short: the actions are being called via jQuery ajax, and the action params are only null if the ajax call is made while the browser is navigating to another page. IE click a link and then trigger an ajax call.</p> <p>I added some crude validation around these calls to ensure that we aren't actually passing nulls in the ajax data, and this hasn't alleviated the problem. An example of one of the calls is below.</p> <pre><code> var searchValue = _txtSearch.val().trim(); if (searchValue === null || searchValue === undefined || searchValue.length &lt; _minimumLengthForSearch) { _txtSearch.focus(); return; } // clear out the value when launching _txtSearch.val(''); $.post(_quickSearchUrl, { searchString: searchValue }, function (data) {...}, "json"); </code></pre> <p>I found <a href="http://blogs.msdn.com/b/ie/archive/2008/07/14/ie8-ajax-navigation.aspx" rel="nofollow">an old IEBlog post</a> that suggests IE might handle this situation differently from other browsers. I was curious as to whether anyone else has encountered this phenomena before. Again, I can only reproduce this issue in IE and only during page navigation.</p> <p>Edit: It is difficult to reproduce this exception with Fiddler active for some reason, but when I manage to Fiddler displays the following error message: </p> <p>Fiddler has detected a protocol violation in session #4. Content-Length mismatch: Request Header indicated 24 bytes, but client sent 0 bytes.</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.
 

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