All
I've just stated playing with the MVC framework included in the ASP .NET
Extensions release, but I'm hving trouble with the default settings.
I have created a default ASP .NET MVC Web Application, which includes a
default controller (HomeController) and two default views (Index and About).
The routes in Global.asax are as follows:
RouteTable.Routes.Add(new Route
{
Url = "[controller]/[action]/[id]",
Defaults = new { action = "Index", id = (string)null },
RouteHandler = typeof(MvcRouteHandler)
});
RouteTable.Routes.Add(new Route
{
Url = "Default.aspx",
Defaults = new { controller = "Home", action = "Index", id = (string)null },
RouteHandler = typeof(MvcRouteHandler)
});
However, only the second route appears to work. I would expect the first to
allow access to the Index page in a browser via the URL
http://localhost/Home/Index, but this gives an HTTP 404 error. I have
changed nothing in the default application, I have just built it and
attempted to access the pages in a browser. Can anyone give me any pointers
as to why this route does not appear to work?
Many thanks for any assistance!

Signature
Regards
Chris Marsh
Chris Marsh - 24 Dec 2007 01:11 GMT
All
I've just discovered that everything works fine when running the application
from Visual Studio; using F5 to launch the debugger.
Any pointers would be very much appreciated.

Signature
Regards
Chris Marsh
> All
>
[quoted text clipped - 37 lines]
>
> Many thanks for any assistance!
Cowboy (Gregory A. Beamer) - 26 Dec 2007 16:59 GMT
I have detailed the wiring of MVC on my blog.
http://gregorybeamer.spaces.live.com/blog/cns!B036196EAF9B34A8!459.entry
This is a very basic blog entry. Check Scott Guthrie's
(http://weblogs.asp.net/scottgu/) and Scott Hanselman's
(http://www.hanselman.com/blog/) blog for more detailed entries.
You should also check out Phil Haack's blog, especially if you are into TDD.
http://haacked.com/
Palermo has also written an article for Code magazine:
http://www.code-magazine.com/Article.aspx?quickid=070173

Signature
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************************************************
| Think outside the box!
*************************************************
> All
>
[quoted text clipped - 44 lines]
>>
>> Many thanks for any assistance!
Chris Marsh - 27 Dec 2007 23:59 GMT
Gregory
Thanks very much for the informative links. It transpired that my problem
stemmed from my use if IIS6. Although I followed instructions and used a
.mvc suffix, I had not registered this suffix with IIS for hand-off to the
ASP .NET ISAPI filter.
I've learnt a lot along the way though, so despite the frustration over
something small it's been a worthwhile experience :)
Cheers!

Signature
Regards
Chris Marsh
>I have detailed the wiring of MVC on my blog.
> http://gregorybeamer.spaces.live.com/blog/cns!B036196EAF9B34A8!459.entry
[quoted text clipped - 60 lines]
>>>
>>> Many thanks for any assistance!