views:

227

answers:

0

Hi I am having an issue where when deploying an MVC site onto an IIS 6 server the url schema is broken. I have followed all the examples for getting IIS 6 to work with MVC and this seems to be ok. The problem is that on all of my IIS 6 request the /default.aspx is being appended to the url.

Here is an example using the Route Tester debugging tool showing the same url on IIS 6 and IIS 7

IIS 7 Route Tester Type in a url in the address bar to see which defined routes match it. A {*catchall} route is added to the list of routes automatically in case none of your routes match.

To generate URLs using routing, supply route values via the query string. example: localhost:14230/?id=123

Matched Route: {controller}/{action}/

Route Data Key Value controller PropertyToRent
action Filter
Data Tokens Key Value


All Routes Matches Current Request Url Defaults Constraints DataTokens False {resource}.axd/{*pathInfo} (null) (null) (null) False {controller}/{action}/{id} (null) (null) (null) True {controller}/{action}/ (null) (null) (null) True {*catchall} (null) (null) (null)


Current Request Info AppRelativeCurrentExecutionFilePath is the portion of the request that Routing acts on.

AppRelativeCurrentExecutionFilePath: ~/PropertyToRent/Filter

IIS 6 Route Tester Type in a url in the address bar to see which defined routes match it. A {*catchall} route is added to the list of routes automatically in case none of your routes match.

To generate URLs using routing, supply route values via the query string. example: localhost:14230/?id=123

Matched Route: {controller}/{action}/{id}

Route Data Key Value controller PropertyToRent
action Filter
id default.aspx
Data Tokens Key Value


All Routes Matches Current Request Url Defaults Constraints DataTokens False {resource}.axd/{*pathInfo} (null) (null) (null) True {controller}/{action}/{id} (null) (null) (null) False {controller}/{action}/ (null) (null) (null) True {*catchall} (null) (null) (null)


Current Request Info AppRelativeCurrentExecutionFilePath is the portion of the request that Routing acts on.

AppRelativeCurrentExecutionFilePath: ~/PropertyToRent/Filter/default.aspx

The Problem As you can see in the AppRelativeCurrentExecutionFilePath the IIS 6 results have the /default.aspx appended to the url causing it to match a different rule to the one required.

Does anybody have any ideas regarding this?

Thanks in advance.