Q:

"Fail Render" Javascript files and Css

I have a strange issue when trying to load some JS and CSS files.
I have an ASP.NET MVC Web Project and inside it I have Index.html and ask to load some script files. I believe it is important to mention that I rewrited the URL in Web.config so instead of showing me something like : localhost:2064/Index.html to show localhost:2064/ or localhost:2064/Index/.
I use the normal "call" for my scripts like:
<link href="/Content/bootstrap.min.css" rel="stylesheet" />
<link href="/Content/Site.css" rel="stylesheet" />
<script src="Scripts/jquery-1.10.2.min.js" ></script>
<script src="Scripts/bootstrap.min.js" ></script>
<script src="Scripts/bootstrap.js"></script>
<script src="Scripts/modernizr-2.6.2.js" ></script>
<script src="Scripts/Layout/menu.js" ></script>

But, in console I get some errors (Chrome Inspector Console):
Uncaught SyntaxError: Unexpected token < :2064/Scripts/jquery-1.10.2.min.js:1
Uncaught SyntaxError: Unexpected token < :2064/Scripts/bootstrap.min.js:1
Uncaught SyntaxError: Unexpected token < :2064/Scripts/bootstrap.js:1
Uncaught SyntaxError: Unexpected token < modernizr-2.6.2.js:1
Uncaught SyntaxError: Unexpected token < menu.js:1
Uncaught SyntaxError: Unexpected token < app.js:1
Uncaught SyntaxError: Unexpected token < indexController.js:1
Uncaught SyntaxError: Unexpected token < homeController.js:1
Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.6/$injector/modulerr?p0=PBA&p1=Error%3A%20%…F1.2.6%2F%24injector%2Fnomod%3Fp0%3DPBA%0A%20%20%20%20at%20Error%20(native...<omitted>...4) MINERR_ASSET:22

When I inspected to see the content of those files I get the following info:
STATUS: 304 Not Modified
CONTENT: Same as my HTML file (not as expected).
Any help? Thanks in advance.

A:

It looks to me that your rewrite logic is wrong. 
If you analyze your errors you will see that each javascript file has a '<' character on the first line. That indicates to me that you are probably serving one of your html files instead of the actual javascript files.
Also make sure you are serving each file with a proper content type, ie 'text/javascript', 'text/html', etc.

