views:

513

answers:

2

I have a small MVC app that works locally, but when I publish it to the server (running IIS6), all the links get messed up.

For example, a typical link when running locally would be:

http://localhost:3467/Exceptions?exdate=20090108

However, when I publish it to our dev server at \\deverserver\apps\MyProject, note the duplication in the URL for the same link:

http://devserver/apps/MyProject/MyProject/Exceptions?exdate=20090108

Any idea what's going on?

Note: These links are all built via Html.ActionLink().

Update: I can duplicate this locally if I specify a Specific Port and Virtual Path in My Project | Web | Use Visual Studio Development Server:

  • Specific Port: 1234
  • Virtual Path: /apps/MyProject
  • Resulting URL: http://localhost:1234/apps/MyProject/MyProject/Exceptions?exdate=20090108
A: 

Is the IIS folder set as an application? It should have a cog icon in the IIS explorer.

Marc Gravell
What he said, except more specifically: is it the Apps folder that has the cog, or the MyProject folder that has the cog? Unless you're doing something unusual with Routing, this is an IIS setup issue.
Peter Seale
Yes, the MyProject folder has the cog. Note my update to the original question - I can reproduce it locally, so I'm assuming it's something in my project set specific to MVC (never seen this problem with regular ASP.NET.
gfrizzle
Ok, I'm tapping out, good luck :) It's also possible that there's a bug in Html.ActionLink as I'm pretty sure ~everyone else deploys their MVC apps to the IIS root folder. Last thing to check: your Routing setup, I don't know what to look for though.
Peter Seale
Is this a side-effect of running on IIS6?
gfrizzle
+4  A: 

Did you performed all the steps (here) to deploy the MVC app in the IIS6?

mapache
That turned out to be the problem. It took me a while to figure out it was an IIS6 problem.
gfrizzle