in asp.net 5 is it possible to store and read custom files in approot instead of wwwroot? -


when deploy asp.net5/mvc6 app there wwwroot folder web assets css, js, images belong, , there approot folder packages , source code belong. seems classes in microsoft.framework.configuration namespace example must able read files below approot since config.json files live.

what want know is, possible store , read custom files of own in approot? , if how?

for example i'm not using entity framework need place put sql install , upgrade scripts , prefer not put them beneath wwwroot. have custom configuration files things navigation sitemap rather not put below wwwroot if possible put them elsewhere such approot.

i know can access files below wwwroot using ihostingenvironment env.mappath("~/somefileinwwwrootfoilder.json")

is there similar way access files under approot?

yes, possible. path app folder , pass configuration or whoever else needs it:

public class startup {     public startup(ihostingenvironment env, iapplicationenvironment appenv)     {         var wwwrootroot = env.webrootpath;         var approot = appenv.applicationbasepath; 

Comments