I am using latest Chrome browser, ASP.NET MVC 4, "jQuery" version="2.0.3", "jQuery.Validation" version="1.11.1", Microsoft.jQuery.Unobtrusive.Ajax" version="2.0.30506.0", and Microsoft.jQuery.Unobtrusive.Validation" version="2.0.30506.0".
My debug and test systems (bundling and minification off) work fine. On my production system, even though the username and password are remembered, and already in the edit boxes, login always fails client side validation (user name required and password required), unless I check the remember me box again, or fully replace the username and password. Login works as expected if I turn off bundling and minification production by setting "BundleTable.EnableOptimizations = false" in the global.asx.cs file.
These are my bundles:
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*"));
and this is how I reference them at the end of the 'head' section along with other scripts:
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery", "~/bundles/jqueryval")
I can't figure out how to debug this using Chrome F12 tools as it only happens on the prod system after deployed and only when bundling and minification are turned on.
If I add the scripts to the end of the 'body' as below, as well as after the 'body', and in both cases, I get a totally empty page though it seems to have all the source.
<body class="Body">
@RenderBody()
@* load scripts last *@
@* bring in script bundles *@
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryval")
@Scripts.Render("~/bundles/SignalR")
<!--Reference the autogenerated SignalR hub script. -->
<script src="~/signalr/hubs"></script>
@Html.DevExpress().GetScripts(
new Script { ExtensionSuite = ExtensionSuite.NavigationAndLayout },
new Script { ExtensionSuite = ExtensionSuite.HtmlEditor },
new Script { ExtensionSuite = ExtensionSuite.GridView },
new Script { ExtensionSuite = ExtensionSuite.PivotGrid },
new Script { ExtensionSuite = ExtensionSuite.Editors },
new Script { ExtensionSuite = ExtensionSuite.Chart },
new Script { ExtensionSuite = ExtensionSuite.Report },
new Script { ExtensionSuite = ExtensionSuite.Scheduler },
new Script { ExtensionSuite = ExtensionSuite.TreeList }
)
@* user scripts *@
@RenderSection("scripts", required: false)
</body>