I'm trying out some URL rewriting within my global.asax - similar to what's going on in this microsoft article http://msdn.microsoft.com/en-us/library/system.web.routing.routetable.routes.aspx
I'm keep getting the error "BC30451: Name 'RouteTable' is not declared."
I have imported the following into the global.asax file:
<%@ Import Namespace="System.Web.Routing" %>
<%@ Import Namespace="System.Web.Routing.Route" %>
<%@ Import Namespace="System.Web" %>
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
RegisterRoutes(RouteTable.Routes) ' the problem occurs here
End Sub
..but it doesn't seem to recognise "RouteTable".
I have checked with my hosting providers that I am on .net 3.5 - although I'm not convinced as at the bottom of the error message says:
Version Information: Microsoft .NET Framework Version:2.0.50727.4234; ASP.NET Version:2.0.50727.4223
They told me :
We have receive an update from our system engineers, net 3.5 is basically version 2 with a few add -ons. Similarly 4.5 is references as version 4.
They have also checked other sites on the server and they are also reflected as 2
Is this correct as I'm not sure if I can do this and not be on 3.5?
Thanks,