{"id":1364,"date":"2013-09-03T16:41:00","date_gmt":"2013-09-03T16:41:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2013\/09\/03\/debug-scriptbundle-results-in-404-if-virtualpath-parameter-contains-a-dot\/"},"modified":"2022-08-09T05:48:02","modified_gmt":"2022-08-09T12:48:02","slug":"debug-scriptbundle-results-in-404-if-virtualpath-parameter-contains-a-dot","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/debug-scriptbundle-results-in-404-if-virtualpath-parameter-contains-a-dot\/","title":{"rendered":"Debug ScriptBundle results in 404 if virtualPath parameter contains a dot"},"content":{"rendered":"<p><span style=\"font-weight: normal\">I spent some time debuging a ScriptBundle problem last Friday and want to share my experience.<\/span><\/p>\n<p>The original code in a MVC project <em>App_Start\/BundleConfig.cs<\/em> file:<\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d09f427b-27f2-4134-9d3f-f4f126c94f6b\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px;padding: 0px;float: none\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol style=\"background: #ffffff;margin: 0 0 0 2em;padding: 0 0 0 5px\" start=\"1\">\n<li><span style=\"background: #ffffff;color: #000000\">bundles.Add(<\/span><span style=\"background: #ffffff;color: #0000ff\">new<\/span><span style=\"background: #ffffff;color: #2b91af\">ScriptBundle<\/span><span style=\"background: #ffffff;color: #000000\">(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/bundles\/jquery.signalR&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">).Include(<\/span><\/li>\n<li style=\"background: #f3f3f3\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #a31515\">&#8220;~\/Scripts\/jquery.signalR-{version}.js&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">));<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>And in a cshtml file, the bundle is included as:<\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:8db2b5e0-466e-4a79-927d-0a2e5c6efc32\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px;padding: 0px;float: none\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\">Code Snippet<\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol style=\"background: #ffffff;margin: 0 0 0 2em;padding: 0 0 0 5px\" start=\"1\">\n<li><span style=\"background: #ffff00;color: #000000\">@<\/span><span style=\"background: #ffffff;color: #2b91af\">Scripts<\/span><span style=\"background: #ffffff;color: #000000\">.Render(<\/span><span style=\"background: #ffffff;color: #a31515\">&#8220;~\/bundles\/jquery.signalR&#8221;<\/span><span style=\"background: #ffffff;color: #000000\">)<\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>In local IIS Express debugging mode, I found no problem. So I deployed to Azure to see if project works in real server. And to my surprise, it reported an error that SignalR is not loaded. The following image from the IE F12 developer tools shows a 404 is returned when getting <em>\/bundles\/jquery.signalR<\/em>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/09\/7002.clip_image001_thumb_6BC432D8.png\"><img decoding=\"async\" title=\"clip_image001\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2013\/09\/7002.clip_image001_thumb_6BC432D8.png\" alt=\"clip_image001\" width=\"459\" height=\"80\" border=\"0\" \/><\/a><\/p>\n<p>To find out if bundling works locally, I changed project configuration to release, and changed web.config <span style=\"background: white;color: red\">debug<\/span><span style=\"background: white;color: blue\">=<\/span><span style=\"background: white;color: black\">&#8220;<\/span><span style=\"background: white;color: blue\">true<\/span><span style=\"background: white;color: black\">&#8221; <\/span>to <span style=\"background: white;color: red\">debug<\/span><span style=\"background: white;color: blue\">=<\/span><span style=\"background: white;color: black\">&#8220;<\/span><span style=\"background: white;color: blue\">false<\/span><span style=\"background: white;color: black\">&#8220;<\/span>. Then running the site on IIS Express returns the same 404 as well.<\/p>\n<p>I did a few searches in Bing. First, I went to MSDN documentation on <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/jj646517.aspx\">ScriptBundle<\/a>. Nothing there except I saw the parameter is named as &ldquo;virtualPath&rdquo;.<\/p>\n<p>Later I found <a href=\"http:\/\/forums.iis.net\/t\/1150130.aspx\">a forum question<\/a> talking about IIS Virtual directory won&rsquo;t work if it has a dot in the name. I also found <a href=\"http:\/\/stackoverflow.com\/questions\/15393790\/mvc4-bundles-returns-404\">a stackoverflow question<\/a> which answer says remove the dot but gave a non-convincing reason. So the solution is to remove the dot from virualPath parameter, and it worked!<\/p>\n<p><span style=\"text-decoration: line-through\">Further search for reason shows that IIS by default rejected URLs that have dot in path for security reasons. For example, in URLScan.ini downloaded from <a href=\"http:\/\/www.iis.net\/learn\/extensions\/working-with-urlscan\/urlscan-setup\">http:\/\/www.iis.net\/learn\/extensions\/working-with-urlscan\/urlscan-setup<\/a>, it shows:<\/span><\/p>\n<div id=\"scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:aeb8e8d6-fee9-4a41-912f-7f7457b9eabd\" class=\"wlWriterEditableSmartContent\" style=\"margin: 0px;padding: 0px;float: none\">\n<div style=\"border: #000080 1px solid;color: #000;font-family: 'Courier New', Courier, Monospace;font-size: 10pt\">\n<div style=\"background: #000080;color: #fff;font-family: Verdana, Tahoma, Arial, sans-serif;font-weight: bold;padding: 2px 5px\"><span style=\"text-decoration: line-through\">Code Snippet<\/span><\/div>\n<div style=\"background: #ddd;max-height: 300px;overflow: auto\">\n<ol style=\"background: #ffffff;margin: 0 0 0 2em;padding: 0 0 0 5px\" start=\"1\">\n<li><span style=\"text-decoration: line-through\"><span style=\"background: #ffffff;color: #000000;text-decoration: line-through\">AllowDotInPath=0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;; If 1, allow dots that are not file<\/span><\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"text-decoration: line-through\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000;text-decoration: line-through\">; extensions. The default is 0. Note that<\/span><\/span><\/li>\n<li><span style=\"text-decoration: line-through\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000;text-decoration: line-through\">; setting this property to 1 will make checks<\/span><\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"text-decoration: line-through\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000;text-decoration: line-through\">; based on extensions unreliable and is<\/span><\/span><\/li>\n<li><span style=\"text-decoration: line-through\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000;text-decoration: line-through\">; therefore not recommended other than for<\/span><\/span><\/li>\n<li style=\"background: #f3f3f3\"><span style=\"text-decoration: line-through\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"background: #ffffff;color: #000000;text-decoration: line-through\">; testing.<\/span><\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: line-through\">In ISA server <a href=\"http:\/\/www.microsoft.com\/resources\/documentation\/isa\/2000\/enterprise\/proddocs\/en-us\/urlscan\/vp_urlscanini.mspx?mfr=true\">URLScan.ini documentation<\/a>, it offers more explanation:<\/span><\/p>\n<blockquote>\n<p><span style=\"text-decoration: line-through\">By default, this option is set to 0. If this option is set to 0, URLScan rejects any request that contains multiple periods (.). This prevents attempts to disguise requests for dangerous file name extensions by putting a safe file name extension in the path information or query string portion of the URL. For example, if this option is set to 1, URLScan might permit a request for http:\/\/servername\/BadFile.exe\/SafeFile.htm because it interprets it as a request for an HTML page, when it is actually a request for an executable (.exe) file with the name of an HTML page in the PATH_INFO area. When this option is set to 0, URLScan may also deny requests for directories that contain periods.<\/span><\/p>\n<\/blockquote>\n<p>In summary, looks like for all the MVC\/WebAPI routing, don&rsquo;t put dot in any virtual path to avoid the above problem.<\/p>\n<p>&nbsp;<\/p>\n<p>Update on 11\/17\/2013:<\/p>\n<p>As indicated by my updated answer in <a href=\"http:\/\/stackoverflow.com\/questions\/15393790\/mvc4-bundles-returns-404\/18602849#18602849\">stackoverflow question<\/a> later, I found the truth behind the problem:<\/p>\n<p>This is caused by the fact that the default MVC routing only handles * instead of * . *, i.e. IIS or IIS Express&#8217;s applicationhost.config has the following:<\/p>\n<pre class=\"lang-cs prettyprint prettyprinted\"><code><span class=\"pun\">&lt;<\/span><span class=\"pln\">add name<\/span><span class=\"pun\">=<\/span><span class=\"str\">\"ExtensionlessUrl-Integrated-4.0\"<\/span><span class=\"pln\"> path<\/span><span class=\"pun\">=<\/span><span class=\"str\">\"*.\"<\/span><span class=\"pln\"> verb<\/span><span class=\"pun\">=<\/span><span class=\"str\">\"GET,HEAD,POST,DEBUG\"<\/span><span class=\"pln\"> type<\/span><span class=\"pun\">=<\/span><span class=\"str\">\"System.Web.Handlers.TransferRequestHandler\"<\/span><span class=\"pln\"> preCondition<\/span><span class=\"pun\">=<\/span><span class=\"str\">\"integratedMode,runtimeVersionv4.0\"<\/span><span class=\"pln\"> responseBufferLimit<\/span><span class=\"pun\">=<\/span><span class=\"str\">\"0\"<\/span><span class=\"pun\">\/&gt;<\/span><\/code><\/pre>\n<p>So to workaround it, we can add the following to the web.config:<\/p>\n<p>&nbsp;&nbsp;&nbsp; &lt;<span style=\"color: #a31515;font-family: Consolas;font-size: x-small\"><span style=\"color: #a31515;font-family: Consolas;font-size: x-small\"><span style=\"color: #a31515;font-family: Consolas;font-size: x-small\">system.webServer<\/span><\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">&gt;<\/span><\/span><\/span><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style=\"color: #a31515;font-family: Consolas;font-size: x-small\"><span style=\"color: #a31515;font-family: Consolas;font-size: x-small\"><span style=\"color: #a31515;font-family: Consolas;font-size: x-small\">handlers<\/span><\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><\/span><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style=\"color: #a31515;font-family: Consolas;font-size: x-small\"><span style=\"color: #a31515;font-family: Consolas;font-size: x-small\"><span style=\"color: #a31515;font-family: Consolas;font-size: x-small\">add <\/span><\/span><\/span><span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\"><span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\"><span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\">name<\/span><\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">=<\/span><\/span><\/span><span style=\"font-family: Consolas;font-size: x-small\"><span style=\"font-family: Consolas;font-size: x-small\">&#8220;<\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">UrlRoutingHandler<\/span><\/span><\/span><span style=\"font-family: Consolas;font-size: x-small\"><span style=\"font-family: Consolas;font-size: x-small\">&#8220;<\/span><\/span>&nbsp;&nbsp;&nbsp;<\/p>\n<p><span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\"><span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\"><span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;type<\/span><\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">=<\/span><\/span><\/span><span style=\"font-family: Consolas;font-size: x-small\"><span style=\"font-family: Consolas;font-size: x-small\">&#8220;<\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">System.Web.Routing.UrlRoutingHandler, <\/span><\/span><\/span><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.Web, Version=4.0.0.0,<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Culture=neutral,<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PublicKeyToken=b03f5f7f11d50a3a<span style=\"font-family: Consolas;font-size: x-small\"><span style=\"font-family: Consolas;font-size: x-small\">&#8220;<\/span><\/span><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\"><span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\"><span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\">path<\/span><\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">=<\/span><\/span><\/span><span style=\"font-family: Consolas;font-size: x-small\"><span style=\"font-family: Consolas;font-size: x-small\">&#8220;<\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">\/bundles\/*<\/span><\/span><\/span><span style=\"font-family: Consolas;font-size: x-small\"><span style=\"font-family: Consolas;font-size: x-small\">&#8221; <\/span><\/span><span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\"><span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\"><span style=\"color: #ff0000;font-family: Consolas;font-size: x-small\">verb<\/span><\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">=<\/span><\/span><\/span><span style=\"font-family: Consolas;font-size: x-small\"><span style=\"font-family: Consolas;font-size: x-small\">&#8220;<\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">GET<\/span><\/span><\/span><span style=\"font-family: Consolas;font-size: x-small\"><span style=\"font-family: Consolas;font-size: x-small\">&#8220;<\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">\/&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><\/span><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/<span style=\"color: #a31515;font-family: Consolas;font-size: x-small\"><span style=\"color: #a31515;font-family: Consolas;font-size: x-small\"><span style=\"color: #a31515;font-family: Consolas;font-size: x-small\">handlers<\/span><\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">&gt;<\/span><\/span><\/span><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;\/<span style=\"color: #a31515;font-family: Consolas;font-size: x-small\"><span style=\"color: #a31515;font-family: Consolas;font-size: x-small\"><span style=\"color: #a31515;font-family: Consolas;font-size: x-small\">system.webServer<\/span><\/span><\/span><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\"><span style=\"color: #0000ff;font-family: Consolas;font-size: x-small\">&gt;<\/span><\/span><\/span><\/p>\n<p>For more information, you can reference the following:<\/p>\n<p><a href=\"http:\/\/weblogs.asp.net\/owscott\/archive\/2013\/01\/16\/handing-mvc-paths-with-dots-in-the-path.aspx\" rel=\"nofollow\">http:\/\/weblogs.asp.net\/owscott\/archive\/2013\/01\/16\/handing-mvc-paths-with-dots-in-the-path.aspx<\/a><\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/9273987\/asp-net-mvc-url-route-supporting-dot\">ASP.NET MVC Url Route supporting (dot)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I spent some time debuging a ScriptBundle problem last Friday and want to share my experience. The original code in a MVC project App_Start\/BundleConfig.cs file: Code Snippet bundles.Add(newScriptBundle(&#8220;~\/bundles\/jquery.signalR&#8221;).Include( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;~\/Scripts\/jquery.signalR-{version}.js&#8221;)); And in a cshtml file, the bundle is included as: Code Snippet @Scripts.Render(&#8220;~\/bundles\/jquery.signalR&#8221;) In local IIS Express debugging mode, I found no problem. So I deployed [&hellip;]<\/p>\n","protected":false},"author":410,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[7447,7286,7448,7449],"class_list":["post-1364","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-bundle","tag-mvc","tag-routing","tag-scriptbundle"],"acf":[],"blog_post_summary":"<p>I spent some time debuging a ScriptBundle problem last Friday and want to share my experience. The original code in a MVC project App_Start\/BundleConfig.cs file: Code Snippet bundles.Add(newScriptBundle(&#8220;~\/bundles\/jquery.signalR&#8221;).Include( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8220;~\/Scripts\/jquery.signalR-{version}.js&#8221;)); And in a cshtml file, the bundle is included as: Code Snippet @Scripts.Render(&#8220;~\/bundles\/jquery.signalR&#8221;) In local IIS Express debugging mode, I found no problem. So I deployed [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/1364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/410"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=1364"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/1364\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=1364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=1364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=1364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}