I am getting invalid response for the page request in ASP.NET web application. This is not happening for all the times but sometimes. This error first noticed after adding bundling and minification in ASP.NET website. I am using the default bundling and minification provided by the ASP.NET using System.Web.Optimization
and WebGrease
.
Bundles are created like follows:
bundles.Add(new ScriptBundle("~/bundles/scripts").Include(
"~/js/jquery.js",
bundles.Add(new StyleBundle("~/bundles/styles").Include(
"~/js/css/*.css",
The bundles are referenced in the page like follows:
<%: Styles.Render("~/bundles/styles") %>
<%: Scripts.Render("~/bundles/scripts")%>
I have static compression enabled in IIS
and dynamic compression is disabled.
Below image is snapshot of a page response.
I have no idea what causes this problem and how can I resolve this issue. Any help is highly appreciated.
Update: I am able to reproduce this issue in all the major browsers and for the different users as well. Tested in IE, Chrome and Firefox.