c# - Routing in Asp.Net MVC4 -



c# - Routing in Asp.Net MVC4 -

i getting "virtualpath must non-empty string starting ~/." error

description: unhandled exception occurred during execution of current web request. please review stack trace more info error , originated in code.

exception details: system.argumentexception: virtualpath must non-empty string starting ~/. parameter name: virtualpath

in below code:

public class routetablehelper { public static routecollection usersiteroutes() { routecollection routes = new routecollection(); registerroutes(routes); homecoming routes; } public static void registerroutes(routecollection routes) { ............... routes.mappageroute("catalogannualreport2013", "catalog/annualreport2013", "www.facebook.com"); ............. } }

routing doesn't extend past own site. might improve utilize standard mvc routing setup , create controller action redirects user facebook?

public class catalogcontroller:controller { public actionresult annualreport2013() { homecoming redirect("http://www.facebook.com"); } }

c# asp.net asp.net-mvc

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -