I have two files with js extension that need to be downloaded one after the other in one view. The problem that has is that I in Debug mode, after I publish from the desired file and put it in IIS, the extension type of the second file is xml. and it gives an error.
The following code works correctly in Debug mode and loads the desired js
@section Scripts {
<script type="text/javascript">
window.$(document).ready(function() {
window.$.getScript("/***/script-controller.js")
.done(function(data, status, jqxhr) {
window.$('#layoutMain').html(ShowLoading());
window.$.getScript("/***/Home.js")
.done(function(data, status, jqxhr) {
})
.fail(function() {
});
})
.fail(function() {
});
})
</script>
}
The following image is in Debug mode

