Try our conversational search powered by Generative AI!

MVC Routing


I am having issue creating a custom route which is not using CMS content, for example I want to use for javascript on the client side


I have add a standard MVC controller


public class mytestController : Controller
// GET: /mytest/

public ActionResult Index()
return View();



Added a entry into Global.asax.cs to test


protected override void RegisterRoutes(RouteCollection routes)

"mytestRoute", // Route name
"mytest/{action}", // URL with parameters
new { controller = "mytest", action = "Index" });



I have not created a view as I want my breakpoint to hit the controller index to check it works, my project is based on the Alloy demo site.

I am using EPiServer 7 release, Windows 7 on IIS7.5 - .Net4 Intregrated App pool


Dec 11, 2012 11:03

This seems to be working now I have registerd ASP.Net 4 in IIS again

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

I now have folder in solution and controller works as expected.


Dec 11, 2012 13:40

I've run into the same thing but I can't get this work at all. 404's every time I try to render the page with additional parameters.

Jan 28, 2013 23:29

Check the Reference to ‘System.Web.MVC’ is V4.0.30319


Also these MVC Templates just released should also help





Jan 29, 2013 9:58

Got them, but I can't get them to load. CMS comes up but I can't create a page. Throws a contentLink is null error.

Jan 29, 2013 17:58
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.