asp.net mvc 3 - Problem to run MVC 3.0 application with IIS7 -
i have created application using: default web site >> right click >> add application
added following details alias : cafm physical path: path of application application pool: asp.net v4.0
now type following in internet explorer, working fine. http://localhost/cafm/authentication/logon
routing code:
public static void registerroutes(routecollection routes) { routes.ignoreroute("{resource}.axd/{*pathinfo}"); routes.ignoreroute("favicon.ico"); routes.ignoreroute("default.aspx"); routes.maproute( "default", // route name "{controller}/{action}/{id}", // url parameters new { controller = "authentication", action = "index", id = urlparameter.optional } // parameter defaults ); } protected void application_start() { arearegistration.registerallareas(); registerglobalfilters(globalfilters.filters); registerroutes(routetable.routes); }
problem: if type following in internet explorer giving me error http://localhost/cafm/
error:
resource cannot found.
description: http 404. resource looking (or 1 of dependencies) have been removed, had name changed, or temporarily unavailable. please review following url , make sure spelled correctly.
requested url: /cafm/
please me, how set default page authentication if user type http://localhost/cafm.
any suggestion appreciated! thanks
imdadhusen
may route should point action logon
not index
routes.maproute( "default", // route name "{controller}/{action}/{id}", // url parameters new { controller = "authentication", action = "logon", id = urlparameter.optional } // parameter defaults );
lg
warappa
Comments
Post a Comment