Error: The incoming request does not match any route.

Topics: MVC, Troubleshooting
Aug 27, 2011 at 2:00 AM

Hi,

I've added some cshtml pages to my Composite C1 app in VS2010. These sit under "Views" (eg Home.cshtml). I added the mvcplayer to a website page I made on C1 Composite CMS and the parameter set to Views. I get the error below when I preview the page.

 

Any idea what I am doing wrong?

Error: The incoming request does not match any route.
Error details:
Failed to get value for function 'Composite.AspNet.MvcPlayer.Render'
Exception has been thrown by the target of an invocation.
The incoming request does not match any route.
Coordinator
Aug 29, 2011 at 8:02 AM
Edited Aug 29, 2011 at 8:08 AM

Hi, can you edit your first post, so it won't contain <div id="content" />? While you have it the majority of visitors cannot post answers because of javascript error at codeplex site :)

If you have problems doing it, open the page in Firefox, and use FireBug to remove the error form you posted, than press "Edit"

Coordinator
Aug 29, 2011 at 8:19 AM

Hello,

Do you have Controller defined?

You wrote "the parameter set to Views" , but notice that MVC player Path parameter determines path to the "controller/action/id", so if you have f.e HomeController.cs which you want to be invoked, so the path should be set to "/Home"

Also check these examples:

http://community.composite.net/C1/Blog.aspx/2011/01/19/Composite-C1-support-ASPNET-MVC-3-and-Razor

http://docs.composite.net/C1/ASP-NET/HelloWorldMVC.aspx/Using-MVC-in-C1