I have an ASP.NET MVC app which runs fine under the debugger running from http://localhost:9002/ But when I publish it to http://localhost/Zot/ the calls to Url.Content are returning incorrect values.
I have script tags like
<script src="<%= Url.Content("~/Scripts/util.js") %>" ...
In the published site this produces:
<script src="Zot/Scripts/util.js" ...
Instead of
<script src="/Zot/Scripts/util.js" ...
or
<script src="Scripts/util.js" ...
I have stylesheet tags like:
<link href="~/Content/Site.css" runat="server" ...
That produce the right thing:
<link href="Content/Site.css" ...
Any suggestions on why Url.Content is failing. I clearly can't put a runat="server"
on the <script>
tags.