简体   繁体   中英

ASP .NET 5 Application Deployment

I am looking at ASP.NET 5 features. I want to know how AppDomain and AppPool fits in ASP.NET 5. In earlier version, ideally an AppDomain will restart if there is a change in web.config or bin folder. But in .NET 5, both web.config and bin folders don't exist while deploying our application. Also, it can be hosted other than IIS(by commands like k-web).

So if we are deploying our .NET 5 application in IIS or any other web server, what is the process involved in it.? How AppDomain restart occur while deployment to IIS.?

The web.config file does still exist if you are using IIS (which is highly likely) and want to use the system.webServer section to configure IIS. It is also required if you are using Azure and want to see full error details as indicated here in the ASP.NET 5 docs.

Secondly, you can still build your project into DLL's by checking the 'Produce outputs on build' check box in the properties window. This can be combined with precompiling your views by including the code below (This only works in Beta 7):

/// <summary>
/// Enable pre-compilation of Razor views, so that errors in your .cshtml files are caught and displayed 
/// in the Visual Studio errors window at compile time, rather than your sites users receiving a runtime 500 
/// internal server error. Pre-compilation may reduce the time it takes to build and launch your project but will 
/// cause the build time to increase. It will also stop edit and continue working for .cshtml files.
/// </summary>
public class RazorPreCompilation : RazorPreCompileModule
{
    public RazorPreCompilation(IServiceProvider provider) : base(provider)
    {
        this.GenerateSymbols = true;
    }
}

I believe the app domain restart based on file changes is a feature of IIS and not a feature of the app itself and I believe this will continue to work. If you are using a host other than IIS, then you are on your own.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM