When you try to re-POST subsequent requests from Internet Explorer browser it only sends only the header data is posted. As a result you will receive error in response – The request body did not contain the specified number of bytes. Got 0, expected xxx. There is already a Hotfix available at Microsoft Knowledge Base https://support.microsoft.com/en-gb/kb/895954.
General Repro Steps –
- For every first XMLHttpRequest, a keep alive connection (TCP Connection) is created which is used by any subsequent request. If the connection is forcibly closed by the browser, then browsers will try to create a new connection by resubmitting the request.
- For GET Requests it will work without any issues. But for POST it will only send Request Headers and not the body in Internet Explorer. That’s why you will receive error – The request body did not contain the specified number of bytes. Got 0, expected xxx.
- As a solution either install above mentioned Hotfix or Use NEW unique URL by adding TimeStamp to URL to avoid any re-POST request.
var urlToPost = "ajaxUrlToPost.svc?stamp=' + new Date().getTime();
Implementing client side localization into any web application is always challenge. Most of web technologies provide localization using server-side technologies. For e.g. .Net application uses Resources Files(.resx) to implement localization into globalization application.
Nowadays world is extensively moving towards Asynchronous development models like AJAX / SPA. Several frameworks, libraries are already available on the web. To access these server side resources requires custom REST services / handlers to be additionally implemented into the host application.
Download Pugin from Github Github.
Install via Nuget Package.
- Refer to the Github Project JQuery Culture Information Plugin
- Install via the NuGet Package Install-Package PritamBaldota.JqueryCultureInfo
Sharing is Caring 🙂