4
Vote

System.ArgumentException: A route named 'Site' could not be found in the route collection.

description

When I run the application I get this error. Please help me getting rid of this problem
 
Source Error:
 
 
Line 379: public static string Site(this UrlHelper urlHelper)
Line 380: {
Line 381: return urlHelper.RouteUrl("Site");
Line 382: }
Line 383:

 
Source File: C:\Dinesh\Help Files\Oxite[1].2009.2.15\Oxite\Oxite.Mvc\Extensions\UrlHelperExtensions.cs Line: 381
 
Stack Trace:
 
 
[ArgumentException: A route named 'Site' could not be found in the route collection.
Parameter name: name]
System.Web.Routing.RouteCollection.GetVirtualPath(RequestContext requestContext, String name, RouteValueDictionary values) +384
System.Web.Mvc.UrlHelper.GenerateUrl(String routeName, String actionName, String controllerName, RouteValueDictionary routeValues, RouteCollection routeCollection, RequestContext requestContext, Boolean includeImplicitMvcValues) +53
System.Web.Mvc.UrlHelper.GenerateUrl(String routeName, String actionName, String controllerName, String protocol, String hostName, String fragment, RouteValueDictionary routeValues, RouteCollection routeCollection, RequestContext requestContext, Boolean includeImplicitMvcValues) +36
System.Web.Mvc.UrlHelper.RouteUrl(String routeName, Object routeValues, String protocol) +61
System.Web.Mvc.UrlHelper.RouteUrl(String routeName) +8
Oxite.Mvc.Extensions.UrlHelperExtensions.Site(UrlHelper urlHelper) in C:\Dinesh\Help Files\Oxite[1].2009.2.15\Oxite\Oxite.Mvc\Extensions\UrlHelperExtensions.cs:381
Oxite.Mvc.OxiteApplication.OxiteApplication_BeginRequest(Object sender, EventArgs e) in C:\Dinesh\Help Files\Oxite[1].2009.2.15\Oxite\Oxite.Mvc\OxiteApplication.cs:68
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

comments

ErikPorter wrote Mar 2, 2009 at 3:49 PM

We've seen this error too, but it only happens when the default site can't be loaded. An app restart usually helps that. In the future we'll change the code around so a failure to load doesn't cause permanent issues (until an app restart).

diniyashell wrote Mar 3, 2009 at 3:39 AM

Could you please tell me how to restart the app?

wrote Apr 8, 2009 at 11:46 PM

wrote Apr 29, 2009 at 2:14 PM

BryanVanRijn wrote Jun 18, 2009 at 7:45 AM

Just kill the asp.net developer server instance(s) (seen in your taskbar: Notification area).

wrote Jul 11, 2009 at 10:24 PM

Mustafamg wrote Jan 25, 2010 at 4:51 AM

i'm facing the same problem. could u please tell me how to restart the application

Mustafamg wrote Jan 25, 2010 at 4:51 AM

i'm facing the same problem. could u please tell me how to restart the application

real_yggdrasil wrote Aug 27, 2012 at 8:21 AM

Get the same error, but not after spending an awful lot of time just getting the code to compile :(


Restart of app doesnt help me.. The problem seems to occur, because whatever is in OxiteRegisterRoutes isnt fired before the RouteURL method is fired.
Why is this, and why seem other users of this Oxite code not have this problem?

Until this is solved, Oxite is useless for me

wrote Feb 21, 2013 at 10:43 PM