本文介绍了什么是wwwroot文件在asp.net vnext的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建在Visual Studio 2015.The新项目asp.net的MVC项目有一个wwwroot的file.What是这样吗?

I create new asp.net mvc project in visual studio 2015.The project has a wwwroot file.What is this?

推荐答案

引用官方网站:

wwwroot文件文件夹中的ASP.NET 5.0中新增的。所有静态文件的
  你的项目进入这个文件夹中。这些资产的应用程序将
  发球直接客户,包括HTML文件,CSS文件,图像
  文件和JavaScript文件。 wwwroot文件夹是根的
  网站。也就是说,点wwwroot下的所有网址
  静态内容是相对于wwwroot文件夹。

code文件应放在wwwroot文件之外。这包括所有的C#文件和剃刀文件。 >有一个wwwroot文件夹中保存code文件和静态文件完全分离。

Code files should be placed outside of wwwroot. That includes all of your C# files and Razor files. > Having a wwwroot folder keeps a clean separation between code files and static files.

Source

这是值得一提的是,这个词的wwwroot 本身当然不是新的,它实际上是在许多平台(包括J2EE应用程序和IIS本身与<$ C $使用的约定C> C:\\的Inetpub \\ wwwroot文件目录)

It's worth mentioning that the term wwwroot itself is certainly not new and it's actually a convention used across many platforms (including J2EE application and IIS itself with its c:\inetpub\wwwroot directory).

类似的约定是的htdocs 的public_html WWW

这篇关于什么是wwwroot文件在asp.net vnext的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-19 02:58