Skip to content →

ASP.NET vNext – Webroot, static content and client side serving (Notes)

Notes from the ASP.NET vNext community stand up.

Web Root, Static Content and client side serving

A new project sub-folder that is the route folder that your webserver hosts e.g. IISExpress would point to the WebRoot folder no instead of the Project Route. Within this folder you will place all the static content that would get served by the webserver. The purpose of this folder is to provide better security and better support for a front end build process. Therefore this folder is where the output of any frontend build process using Gulp, Grunt or Bower would go. It can be thought of as the bin folder for static files and WebRoot can be viewed as

If you have moved to using bower to manage your front end assets, then you would have a task runner to copy your assets from bower_components to the WebRoot.

WebRoot would not be checkedin to your source control folder, as its built as part of the build process.

This is a very common pattern for Ruby & NodeJS developers.

Build orchestration on Windows within Visual Studio will use new project file type, appname.kproj which is an MSBuild file for Visual Studio, however MSBuild is not used for compilation as compilation is done at run time.

 

Publishing processes within Visual Studio to compile and build a package for publishing use the KPack solution.

Recommendations

  • Build out a front end build process using Grunt, Gulp and Bower.
  • Move minified/transformed content files from bower_components to a separate content folder

Reference

https://www.youtube.com/watch?v=fNJ70gRmPWU&list=PL0M0zPgJ3HSftTAAHttA3JQU4vOjXFquF&index=6

Published in ASP.net

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *