If you add the following lines of code to your web.config file it should sort the problem out:
<system.webServer>
...
<handlers>
<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*"
type="System.Web.Routing.UrlRoutingModule"
resourceType="Unspecified"
preCondition="integratedMode" />
</handlers>
</system.webServer>
I noticed the exact same error when using a MiniProfiler with an MVC 4 application. This fixed it for me. For more information, check out the MiniProfiler forum:
http://community.miniprofiler.com/permalinks/113/microsoft-jscript-runtime-error-miniprofiler-is-undefined