MVC development in progress, because the web under the view folder. by default, the config file will hand over any file and path requested by any method to system. web. httpnotfoundhandler. to achieve unified control of the controller.
<Httphandlers>
<AddPath= "*"Verb= "*"
Type= "System. Web. httpnotfoundhandler"/>
</Httphandlers>
Now the project metadata uses a static page to create a table. If you directly request a. html file in mvc, it is required to wait for 404.
To solve this problem, let's take a look at the msdn chapter on Web. config and find a handler of system. Web. staticfilehandler. The meaning of the words is estimated to be reliable and put it directly in front of notfoundhandler.
< Httphandlers >
< Add Verb = "Get, head" Path = "*. Html" Type = "System. Web. staticfilehandler" />
< Add Path = "*" Verb = "*"
Type = "System. Web. httpnotfoundhandler" />
</ Httphandlers >
Find the HTML file in view and right-click it to view it in the browser. In this case, 404 is not reported, so that the static file can be accessed in the Views folder of the MVC project.