So a long long time ago we added MVC 1.0 to an existing ASP.NET 2.0 WebForms site and during that upgrade we made MVC's UrlHelper available to our existing WebForms code. This meant that within our WebForms code we could do such things as:
<%= Url.Content("~/this/is/nice") %>
to output the Url
mysite.com/this/is/nice
which was nice and worked great.
Fast forward to more recent times and we're looking to move our application to a new home (new servers) and the above functionality is now misbehaving, now:
<%= Url.Content("~/this/is/nice") %>
now outputs
mysite.com/webforms/location/this/is/nice
as if the physical location is the application root - and I've no idea why and have been unsuccessful in recreating it on my development machine.
Does anyone out there what can possibly be the cause of this? I've been stuck on this problem for the past few days now and am nearly out of ideas. The only glimmer of hope I have right now is that the problem occurs on my colleague's environment so it's definitely an issue we can recreate.
Update: it doesn't happen on all WebForms pages - just certain ones and the only differing characteristic I've noticed so far is that it's occurring on a page where some Url rewriting is going on.