This project is read-only.

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

Mar 9, 2009 at 2:49 AM
Hi, I'm getting this error:

Server Error in '/' Application.

A route named 'Site' could not be found in the route collection.
Parameter name: name

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Source Error:

Line 444:        public static string Site(this UrlHelper urlHelper)
Line 445: {
Line 446: return urlHelper.RouteUrl("Site");
Line 447: }
Line 448:

Source File: C:\ASPNET\Oxite\Oxite.Core\Extensions\UrlHelperExtensions.cs    Line: 446

I followed the install instructions (Getting Started with Oxite) and I have MVC 1.0 RC2 with VWD 2008 SP1 and SQL Server 2008 installed.

Thanks for you help.
Mar 9, 2009 at 6:16 AM
There's an unfortunate bug where when the app starts and can't get all the data it needs but continues anyway so not all the routes are loaded and that error is what you see when it actually has nothing to do with route problems.  Can you debug the app starting up (start in OxiteApplication.OnStart) and see what really isn't getting loaded up.  I will try to find the bug that lets it go through and give the wrong error in the meantime.
Mar 9, 2009 at 6:23 PM
I was just playing around with it and it seems that when SQL Server Management Studio is open the ASP.NET Development Server isn't able to connect to connect to the database. When I load Oxite it throws an error saying that the local user isn't able to login to the database, then if I refresh the page it displays the "Server Error in '/' Application. A route named 'Site' could not be found in the route collection. Parameter name: name" error.

To get Oxite to load correctly I refreshed the SQL Server (SQLEXPRESS) service and close SQL Server Management Studio.

- Just a quick question. How do I update the Oxite.2009.2.15.Source Release with the newest Oxite Source Code project?

Mar 11, 2009 at 5:11 PM
I got this bug at one stage also. However I don't think it's because SQL Server is open, but rather probably has something to do with attaching the mdb file.
I'm just messing about with Oxite at the minute and looking at what DB tables are affected etc. but I suggest you should create a new database, run the scripts, and then just point your web.config to this. You shouldn't get the error again (if indeed you got it for the same reasons as I did).

Mar 11, 2009 at 9:16 PM
Hi Cathal,

Thanks, I'll try that out.

Have a great day,
Apr 29, 2009 at 7:29 PM
I had this the first time I ran the OxideSite.  I set a debug in the OxideApplication.OnStart and found no errors and the page loaded correctly the second time.
Apr 29, 2009 at 8:49 PM
Funny.  I have a cousin named Chris Porter.  ;)

Yah, the only time that should happen is if it couldn't properly load the data the app needs.  So if there's a problem connecting to the database when the app loads, this could happen.  After it can get a proper connection and the app starts again it should be fine.
Jun 17, 2009 at 9:47 PM

I also ran into this problem right now.

Where can I find the SQL to create the appropriate database schemas?


Jun 21, 2009 at 5:58 AM


Are you running the latest release or the latest checkin?  The sql script for the latest release is in the setup folder.  There is no sql script for the latest release.  Though, the latest schema is in OxiteSite/App_Date/Oxite.Database.MDF