新创个MVC,然后启动,index,about都能打开,但我在Controllers自己建一个DefaultControllers并创建生成页面后,设为启动页,就会暴在页面上看到Server Error in '/' Application. The resource cannot be found.Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. Requested URL: /Views/Home/Index.cshtml
http://localhost:2183/Views/Home/index.cshtml 这是报错的地址
用默认的是http://localhost:2183/Home/About 能正常打开请问怎么回事

解决方案 »

  1.   

    http://localhost:2183/Default1/index 把地址改成这样就能正常了
    好像是只要设为启动页面,地址都会变成http://localhost:2183/Views/Ddefault1/index.cshtml
    ... 为什么会这样
      

  2.   

    mvc不能把启动页右键指定到某个页面
    原因是启动起来,是不符合mvc,routing的可以在项目属性里设定启动的路径
    路径格式是
    http://localhost:2183/Home/Index
      

  3.   

    也可以用默认页,启动后,手动改的你要调试的view地址
    http://localhost:2183/Home/About
    改成
    http://localhost:2183/Home/Index
      

  4.   

    url 都重写了。在 global.acax 里。不符合规则的路径当然都不行。