ASP.Net MVC 3: Routing URLs result in 404 when I move from local to dev server -


i have simple home , game controller set so:

public class homecontroller : basecontroller {     public actionresult index()     {         return view();     } }    public class gamecontroller : basecontroller {     [httppost]     public actionresult new(int level = 1)     {         ...     }      public actionresult flipcard(int row, int column,guid nonce)     {         ...     }      [outputcache(duration=constants.cache_image_expiration_seconds)]     public fileresult image (guid imageid)     {         ...     }      public actionresult finish()     {         ...     }  } 

i have routing set such in global.asax.cs:

public class mvcapplication : system.web.httpapplication {     ...      public static void registerroutes(routecollection routes)     {         routes.ignoreroute("{resource}.axd/{*pathinfo}");          routes.maproute(             "default", // route name             "{controller}/{action}/{id}", // url parameters             new { controller = "home", action = "index", id = urlparameter.optional } // parameter defaults         );      }      protected void application_start()     {         arearegistration.registerallareas();          registerglobalfilters(globalfilters.filters);         registerroutes(routetable.routes);     } } 

when run site using iis express; can access http://localhost/ fine , see html in home/index view; use actions on game controller.

when run site virtual directory in iis locally; can see same view @ http://localhost/site/; , can use game controller actions here well.

however, when deploy our development server in virtual directory set .net 4 app , load http://dev/site/; can't see home/index view. instead, directory listing of files in site root sub directory. game controller actions aren't accessible well. accessing of site's urls results in 404.

google'd around issue; found few solutions , tried them all; none of them seem work.

some notes

  • i have mvc3 assemblies deployed local bin folder

  • the app pool site on servers .net 4.0.

  • i built test web form displays application's root directory(server.mappath("~")) confirm virtual directory configured web app. deployed http://*/site/test.aspx, results expected:
    • local: c:\inetpub\wwwroot\site
    • dev: e:\inetpub\wwwroot\site

i'm stumped issue is. ideas? constructive input appreciated.

thanks,frank

is iis set hand off requests .net handlers via wildcard mapping? if not .net never see request in order process route.

http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-integrated-pipeline/


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -