什么是wwwroot文件在asp.net vnext [英] What is wwwroot in asp.net vnext

查看:286
本文介绍了什么是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文件夹是根的
  网站。也就是说, HTTP://some.hostname/ 点wwwroot下的所有网址
  静态内容是相对于wwwroot文件夹。

The wwwroot folder is new in ASP.NET 5.0. All of the static files in your project go into this folder. These are assets that the app will serve directly to clients, including HTML files, CSS files, image files, and JavaScript files. The wwwroot folder is the root of your web site. That is, http://some.hostname/ points to wwwroot, all URLs for static content are relative to the wwwroot folder.

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.

<一个href=\"http://www.asp.net/vnext/overview/aspnet-vnext/grunt-and-bower-in-visual-studio-2015#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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆