Asp.net mvc 5 Asp.Net MVC 5模板:缺少BundleCollection脚本-返回500个内部服务器错误
在Visual Studio 2013 Express Web中创建并按下F5后,我收到错误的脚本引用和Asp.net mvc 5 Asp.Net MVC 5模板:缺少BundleCollection脚本-返回500个内部服务器错误,asp.net-mvc-5,bundling-and-minification,visual-studio-2013,Asp.net Mvc 5,Bundling And Minification,Visual Studio 2013,在Visual Studio 2013 Express Web中创建并按下F5后,我收到错误的脚本引用和500内部服务器错误 该页面位于http://localhost:1874 3个脚本(jquery、modernizer和bootstrap)工作正常 但是第四个脚本引用似乎不知从哪里冒出来,它使用了“错误的端口”1563,并指向一个不存在的路径http://localhost:1563/e85db51b515e433384e40d2dd8b28559 这是我的包 public class
500内部服务器错误
- 该页面位于
http://localhost:1874
- 3个脚本(jquery、modernizer和bootstrap)工作正常
- 但是第四个脚本引用似乎不知从哪里冒出来,它使用了“错误的端口”
,并指向一个不存在的路径1563
http://localhost:1563/e85db51b515e433384e40d2dd8b28559
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"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css",
"~/Content/bootstrap-responsive.css"));
}
}
这第四个参考来自哪里?
如何修复端口和文件路径
Chrome开发工具-标题输出
get看起来像这样:
GET /e85db51b515e433384e40d2dd8b28559 HTTP/1.1
Host: localhost:1563
Connection: keep-alive
Cache-Control: max-age=0
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
Referer: http://localhost:1874/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en,en-US;q=0.8,de;q=0.6,de-DE;q=0.4
HTTP/1.1 500 Internal Server Error
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Mon, 02 Dec 2013 23:00:58 GMT
响应头如下所示:
GET /e85db51b515e433384e40d2dd8b28559 HTTP/1.1
Host: localhost:1563
Connection: keep-alive
Cache-Control: max-age=0
Accept: */*
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
Referer: http://localhost:1874/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en,en-US;q=0.8,de;q=0.6,de-DE;q=0.4
HTTP/1.1 500 Internal Server Error
Content-Length: 0
Server: Microsoft-HTTPAPI/2.0
Date: Mon, 02 Dec 2013 23:00:58 GMT
什么是不清楚的?
我仍然不知道如何修复浏览器链接的端口
谢谢Visual Studio
在生成的页面中,罪魁祸首似乎是以下几行:
<!-- Visual Studio Browser Link -->
<script type="application/json" id="__browserLink_initializationData">
{"appName":"Chrome","requestId":"8cec45910def4767bfb3087ff70084cf"}
</script>
<script type="text/javascript" src="http://localhost:1563/e85db51b515e433384e40d2dd8b28559" async="async"></script>
<!-- End Browser Link -->
{“appName”:“Chrome”,“requestId”:“8cec45910def4767bfb3087ff70084cf”}
将此添加到webconfig将删除
Visual Studio
在生成的页面中,罪魁祸首似乎是以下几行:
<!-- Visual Studio Browser Link -->
<script type="application/json" id="__browserLink_initializationData">
{"appName":"Chrome","requestId":"8cec45910def4767bfb3087ff70084cf"}
</script>
<script type="text/javascript" src="http://localhost:1563/e85db51b515e433384e40d2dd8b28559" async="async"></script>
<!-- End Browser Link -->
{“appName”:“Chrome”,“requestId”:“8cec45910def4767bfb3087ff70084cf”}
将此添加到webconfig将删除
我很高兴能够删除visual studio浏览器链接,但这对我的问题没有帮助,不幸的是:(我很高兴能够删除visual studio浏览器链接,但对我的问题没有帮助,不幸的是:(