开发者

System.Web.HttpException: The file '/StudentPortal3G/Home.mvc.aspx' does not exist

Getting this error, everytime my home/INdex loads in my MVC3 app on Server 2008.

System.Web.HttpException: The file '/StudentPortal3G/Home.mvc.aspx' does not exist.

Tried all of this:

  routes.MapRoute(
                "Default",                                              // Route name
                "{controller}/{action}/{id}",                           // URL with parameters
                new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
            );

            routes.MapRoute(
                "Default2",                                              // Route name             
                "{controller}.aspx/{action}/{id}",                      // URL with parameters             
                new { controller = "Home", action = "Index", id = "" }  // Parameter defaults         ); 
            );
            routes.MapRoute(
                "Default3",                                             // Route name             
                "{controller}.mvc.aspx/{action}/{id}",                  // URL with parameters             
                new { controller = "Home", action = "Index", id = "" }  // Parameter defaults         ); 
            );

Views\Home\Index.aspx exists.

IIS7 is not supposed to need the .* handler. Do I need to set the aspx handler to not check existance of file? But the file exists? If this is the answer, how d开发者_Python百科o I set it on iis7, I wasn't able to find that to try it.

Isn't there a way to do it in the handlers section of the web.config? Again I found a few hint's but I'm not quite getting it.

Thanks,

Cal-


Did you add appropriate Views? In this case, you should have Views\StudentPortal3G\ (assuming that StudentPortal3G is a Controller) directory with Home.aspx inside and it maps to /StudentPortal3G/Home

Why are you trying to load Home.mvc.aspx at all is beyond me. I'd suggest you fire up RouteDebug to see which rules you are missing...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜