且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

什么是ASP.NET MVC4的错误?

更新时间:2022-11-23 13:23:50



请指定您正在使用的环境。在vs中你需要检查global.asps.cs并设置启动哪个页面(默认页面),就像我们在普通的html中使用index.htm一样。它位于global.asps.cs的RegisterRoutes()中。

如果没有解决您的问题,您可以详细发布您的代码。



谢谢


尝试在web.config文件中将 relaxedUrlToFileSystemMapping 设置为 true

< configuration >
< system.web >
< httpruntime relaxedurltofilesystemmapping = true / >
< / system.web >
< / configuration >







--Amit


Hello! I use ASP.NET MVC4 C#.
I wrote a simple source and try to start it and get next error:

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: /

Can you tell me, how it fix?

hi,
please can you specify what environment you are using. in vs you need to check the global.asps.cs and set which page to start up(default page)like we use index.htm as default in normal html. It is in RegisterRoutes() of global.asps.cs
If is didn''t solved your problem, can you post your codes in detail.

thanks


Try setting relaxedUrlToFileSystemMapping to true in web.config file:
<configuration>
   <system.web>
    <httpruntime relaxedurltofilesystemmapping="true" />
   </system.web>
</configuration>




--Amit