Theme-Logo
  •   .Net
    •   C Sharp(C#)
    •   Web API
    •   Micro Services
    •   ASP.Net
    • ASP.Net MVC
    • .Net Core
  •   Database
    • SQL Server
    • Oracle
    • PostgreSQL
  •   jQuery
    • jQuery Tutorials
    • jQuery Plugins
    • jQuery UI
    • More on jquery
  •   Tutorials
    • Microservices Tutorials
    • DotNet Core Tutorials
    • PostgreSql Tutorials
Deploy .Net Core Application on IIS

ASP Dot Core is a cross platform and open source framework which is used to build modern web applications, APIs and other. In this article we are going to see how to deploy or publish the ASP.NET Core web application in IIS.

Prerequisites For Deployment

  • Install the .NET Core Hosting Bundle
  • .NET Core SDK installed on the development machine.
  • Windows Server configured with the Web Server (IIS) server role
  • Step- 1 : Create ASP.Net Core Application

    Let's create any ASP.Net Core Web application using visual studio 2019. I have created a ASP.Net Core (Ver 3.1) application. Solution is as below:

    DotNet Palace

    Step- 2 : Now Publish ASP.Net Core Application

    Right click on solution and select Publish option from menu. You will see below screen for publish configuration/option. You can save/edit these option for your current project. Set target location where you want to put your published application.

    DotNet Palace

    Set publish settings and other settings like target framework, Deployment mode, Target Runtime etc.

    DotNet Palace

    Summary for publish options will be like this:

    DotNet Palace

    Step- 3 : Put published folder at deployment server/machine

    After publishing project you will find that entire application (View files, Controllers and other C# classes) converted into DLL. Copy root folder from development machine to deployment server.

    Step- 4 : Create application pool and host at IIS

    Create virtual directory at deployment server like normal .Net application and select .Net CLR version for application pool as No Managed Code and Managed Pipeline mode as Integrated.

    DotNet Palace

    Step- 5 : Change Configuration (Web.config) File

    Now main action need to do with web.config file. We need to add ProcessPath and log file path in < system.webServer > section like below:

    DotNet Palace

    Here you need to set log file path from stdoutLogFile, which will write error (if any) at this path and this would help you to do accordingly like installation of some missing SDK of .Net core etc.

    Now your .Net core application is ready to browse with your application's virtual name.

    Summary

    Hopefully this article will help you to publish your .Net application at IIS/Window Server. Please give your valuable suggestions/feedback regarding this article

    Cheers!

    Trending Post
    Benefits of using ASP.NET Core over ASP.NET.
    Role of Startup class in .Net Core.
    Interview Questions and Answers
    What is Request delegate?
    What is Host in ASP.NET Core?
    Describe the Generic Host and Web Host?
    Describe the Servers in ASP.NET Core?
    How to read values from Appsettings.json file?
    How to handle errors in ASP.NET Core?
    About us

    DotNet Palace is a community platform created and maintained by The articles are mainly focused on Microsoft stack technologies like C#, ASP.Net, MVC, .Net Core, SQL Server and Oracle, PostgreSQL, SQLite etc. To improve the site's content you can send your valuable suggestions at info.dotnetpalace@gmail.com

    Quick links
  • SOLID Principles
  • Questions
  • OOPS Principles
  • DotNet Palace Tutorials
  • Privacy Policy
  • Terms and Condition