How to Configure an Alternative Folder to wwwroot in ASP.NET Core? -


is possible configure different folder replace wwwroot in asp.net core? , if yes, how , there side effects change?

the config includes wwwroot in entire project found in project.json seen in code below; replacing value name of new folder not enough static file (ex: index.html) read.

"publishoptions": { "include": [   "wwwroot",   "web.config" ] }, 

is possible configure different folder replace wwwroot in asp.net core?

yes. add usewebroot call in program class:

public static void main(string[] args) {     var host = new webhostbuilder()         .usekestrel()         .usewebroot("myroot") // name whatever want         .usecontentroot(directory.getcurrentdirectory())         .useiisintegration()         .usestartup<startup>()         .build();      host.run(); } 

are there side effects change?

here 3 can think of:

  1. the bower package manager not work properly, looks lib folder in wwwroot. i'm not if configurable.
  2. you need fix bundleconfig.json @ new directory.
  3. you need update include portion in project.json include new directory in publish output.

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -