无法加载的所有资源 - 错误500 [英] Failed to load all resources - error 500
问题描述
我有一个问题,在那里我得到这个错误在开发者控制台,所有的CSS,图像和js文件:
无法加载资源:服务器与500(内部服务器错误)的状态回应
文件名和路径看起来很好,它的发生的所有资源。该项目是一个ASP.NET MVC项目,我的同事可以建立并运行得很好,没有这些错误。该项目位于我平时的项目文件夹,我从来没有经历过这个问题。我还检查了文件夹的权限,而我,为什么发生这种情况完全无能。
的资源被捆绑,但如果我手动创建链接的资源,它的开发者控制台抛出同样的错误。
有没有人试过像这样过吗?
日志:登录
追踪日志:追踪日志
BundleConfig.cs
公共类BundleConfig
{
//关于捆绑的更多信息,请访问http://go.microsoft.com/fwlink/?LinkId=301862
公共静态无效RegisterBundles(BundleCollection包)
{
bundles.Add(新ScriptBundle(〜/包/ jQuery的)。包括(
〜/脚本/ jquery- {}版本的.js
〜/脚本/ jquery.min.js
〜/脚本/ jquery.simplemodal.js
〜/脚本/ jquery.flot.min.js
〜/脚本/ jquery.flot.categories.min.js
)); bundles.Add(新ScriptBundle(〜/包/语言)。包括(
〜/语言/ english.js
〜/语言/ spanish.js
〜/语言/ french.js
));
bundles.Add(新StyleBundle(〜/内容/ CSS)。包括(
〜/风格/ StyleNuheat.css
〜/风格/ buttons.css
〜/风格/ energy.css
〜/风格/ modalwindow.css
〜/风格/ dropdown.css
〜/风格/ jQuery的-ui.css
)); bundles.Add(新ScriptBundle(〜/包/温控器)。包括(
〜/脚本/ appl_thermostats.js
〜/脚本/ appl_thermostat_details.js
〜/脚本/ appl_schedule.js
)); bundles.Add(新ScriptBundle(〜/包/通用)。包括(
〜/脚本/ appl_supporter.js
〜/脚本/ appl_master.js
〜/脚本/ appl_navigation.js
〜/脚本/ appl_general.js
)); bundles.Add(新ScriptBundle(〜/包/能源)包括:(
〜/脚本/ appl_energy.js
〜/脚本/ jQuery的-ui.js )); bundles.Add(新ScriptBundle(〜/包/ useraccount)。包括(
〜/脚本/ appl_useraccount.js
));
bundles.Add(新ScriptBundle(〜/包/组)。包括(
〜/脚本/ appl_groups.js
));
bundles.Add(新ScriptBundle(〜/包/登录)。包括(
〜/脚本/ appl_login.js
));
}
}
根据您提供你在你的web.config文件中有问题的跟踪日志文件。一个例外消息 C:\\用户\\ teilmann \\源\\ Nuheat \\ oj.web \\ oj.web.main \\ web.config中(112):无法添加类型的重复的集合条目mimeMap具有独特的关键属性fileExtension设置为以.json
最有可能你为JSON定义MIME类型的网站和应用程序级文件既
I have a problem where i get this error in the developer console, for all css, image and js files:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
The file name and path looks fine and it's happening for ALL resources. The project is an ASP.NET MVC project, which my co-worker can build and run just fine, without these errors. The project is located in my usual projects folder and i have never experienced this problem before. I also checked the folder permissions, and i am completely clueless as to why this is happening.
The resources are bundled, but if i create the links to the resources manually, it throws the same errors in the developer console.
Have anyone ever tried something like this before?
Log: Log
Tracelog: Tracelog
BundleConfig.cs
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery.min.js",
"~/Scripts/jquery.simplemodal.js",
"~/Scripts/jquery.flot.min.js",
"~/Scripts/jquery.flot.categories.min.js"
));
bundles.Add(new ScriptBundle("~/bundles/language").Include(
"~/Language/english.js",
"~/Language/spanish.js",
"~/Language/french.js"
));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Styles/StyleNuheat.css",
"~/Styles/buttons.css",
"~/Styles/energy.css",
"~/Styles/modalwindow.css",
"~/Styles/dropdown.css",
"~/Styles/jquery-ui.css"
));
bundles.Add(new ScriptBundle("~/bundles/thermostat").Include(
"~/Scripts/appl_thermostats.js",
"~/Scripts/appl_thermostat_details.js",
"~/Scripts/appl_schedule.js"
));
bundles.Add(new ScriptBundle("~/bundles/general").Include(
"~/Scripts/appl_supporter.js",
"~/Scripts/appl_master.js",
"~/Scripts/appl_navigation.js",
"~/Scripts/appl_general.js"
));
bundles.Add(new ScriptBundle("~/bundles/energy").Include(
"~/Scripts/appl_energy.js",
"~/Scripts/jquery-ui.js"
));
bundles.Add(new ScriptBundle("~/bundles/useraccount").Include(
"~/Scripts/appl_useraccount.js"
));
bundles.Add(new ScriptBundle("~/bundles/groups").Include(
"~/Scripts/appl_groups.js"
));
bundles.Add(new ScriptBundle("~/bundles/login").Include(
"~/Scripts/appl_login.js"
));
}
}
According to the TraceLog file that you provided you have a problem in your web.config file. An exception message is C:\Users\teilmann\source\Nuheat\oj.web\oj.web.main\web.config ( 112) :Cannot add duplicate collection entry of type "mimeMap" with unique key attribute "fileExtension" set to ".json"
Most likely you have a MIME type defined for JSON files both on the WebSite and application level
这篇关于无法加载的所有资源 - 错误500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!