I have a web application asp.net mvc. In this application, I use DataTables that I configure like that to have the french language:
<script type="text/javascript">
$(function () {
$('table#list').DataTable({
'language': {
'url': '@Url.Content("~/Content/datatables-i18n.fr.json")'
}
})
});
</script>
When I test my application locally, it works, I have the datatable in French but when I publish my application (with Visual Studio), it's not working anymore. I have this error :
Failed to load resource: the server responded with a status of 404 (Not Found)
But if I pass the cdn url instead of my file, it works locally and also after publishing :
<script type="text/javascript">
var table;
$(function () {
table = $('table#list').DataTable({
language: {
'url': 'http://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
}
})
</script>
Do you know why the file is not find after publishing ?
