M_O_J_O
asked on
MVC routing problem … need to type /home
Hi all,
My MVC3 website on my production Windows Server 2008 R2 (SP1) is bugging me and I need your help.
If I type ... http://www.mywebsite.com ... it shows me the IIS7.5 Welcome Screen. But if I type http://www.mywebsite.com/home ... then everything works fine.
Here's my global.asax:
I tried aspnet_regiis -ir, but that didn't help.
Any idea why it doesn't work without the /home ???
Thanks!!
Mojo
My MVC3 website on my production Windows Server 2008 R2 (SP1) is bugging me and I need your help.
If I type ... http://www.mywebsite.com ... it shows me the IIS7.5 Welcome Screen. But if I type http://www.mywebsite.com/home ... then everything works fine.
Here's my global.asax:
Public Class MvcApplication
Inherits System.Web.HttpApplication
Shared Sub RegisterGlobalFilters(ByVal filters As GlobalFilterCollection)
filters.Add(New HandleErrorAttribute())
End Sub
Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
' MapRoute takes the following parameters, in order:
' (1) Route name
' (2) URL with parameters
' (3) Parameter defaults
routes.MapRoute( _
"Default", _
"{controller}/{action}/{id}", _
New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional} _
)
End Sub
Sub Application_Start()
AreaRegistration.RegisterAllAreas()
RegisterGlobalFilters(GlobalFilters.Filters)
RegisterRoutes(RouteTable.Routes)
End Sub
End Class
I tried aspnet_regiis -ir, but that didn't help.
Any idea why it doesn't work without the /home ???
Thanks!!
Mojo
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER