Asp.net mvc 3 and static resources 404'ing when using “Local IIS Web server?

Of course, it turns out to be something extremely simple: there was an HttpHandler defined in the root Web. Config instead of just the View directory's Web.config.

Up vote 1 down vote favorite share g+ share fb share tw.

Here's the situation: ASP. NET MVC 3 application using Razor as the view engine. Works fine under Visual Studio Development Server (Cassini) However, when I switch over to "Use Local IIS Web server", the site functions, but every static resource 404s (again, there were no issues under Cassini).

ASP. NET 4.0, Windows 7 Ultimate x64, IIS 7.5, Integrated Pipeline, Network Service as app pool identity. Specifically, an exception for trying to access a static file that is known to exist (i.e.

Remove application files, specifically DLLs with route information, etc. and it is served up without issue). Again, this occurs for all static files including i.e. /public/scripts/jquery.

Js: Error in Path :/favicon. Ico Raw Url :/favicon. Ico Message :Path '/favicon.

Ico' was not found. Source :System. Web Stack Trace : at System.Web.

HttpNotFoundHandler. ProcessRequest(HttpContext context) at System.Web.HttpApplication. CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.

ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) TargetSite :Void ProcessRequest(System.Web. HttpContext) NLogLogger. Fatal => NLogLogger.

Fatal => LoggerImpl. Write I'm baffled. I've verified that a test default ASP.

NET MVC 3 app runs fine under both VS Development Server and Local IIS Web server on this machine. My hope is that someone else has run into a similar issue. In case it helps, here are my routes: public static void RegisterRoutes(RouteCollection routes) { routes.

IgnoreRoute("{resource}. Axd/{*pathInfo}"); routes. IgnoreRoute("favicon.

Ico"); routes. MapRoute( "Login", // Route name "login", // URL with parameters new { controller = "Session", action = "Create" } // Parameter defaults ); routes. MapRoute( "Logout", // Route name "logout", // URL with parameters new { controller = "Session", action = "Delete" } // Parameter defaults ); routes.

MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter. Optional } // Parameter defaults ); } asp. Net-mvc-3 link|improve this question asked Mar 16 '11 at 10:01Ted1,83121527 95% accept rate.

Of course, it turns out to be something extremely simple: there was an HttpHandler defined in the root Web. Config instead of just the View directory's Web. Config Obvious now, but hopefully by posting here it might save somebody else wasting time on something so obvious.

See haacked.com/archive/2008/06/25/aspnetmvc... for more info.

This fix our problem, but also had to add the line to the section – bstoney May 17 '11 at 6:47.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions