我正在开发mvc5 web应用程序,并将所有.js文件放在Script文件夹中。 但是,我添加了ckeditor插件,并将有关ckeditor的所有文件放在名为“ckeditor”的新文件夹中,并且它与默认的“Script”文件夹位于同一级别。
我在BundleConfig.cs中添加了ckeditor.js
bundles.Add(new ScriptBundle("~/bundles/ckeditor").Include(
"~/ckeditor/ckeditor.js"));
并将其添加到_Layout.cshtml
内部ckeditor依赖于config.js和“ckedit”文件夹中的其他一些文件,一切都在本地服务器上正常工作。
问题出在我发布应用程序时。我得到的错误如下:
Failed to load resource: the server responded with a status of 404 (Not Found)
path: http:site.com/ControllerName/config.js?t=E3OD
关于ckeditor的一切都试图从这条路径加载。
为什么尝试从此路径加载config.js并且仅在我发布应用程序时。
我需要做些什么才能让它在本地和生产中发挥作用。