Deploying an ASP.NET Core Web API on IIS
Feb 22, 2021 11:11 0 Comments ASP.NET Core RITA

Deployment of applications and APIs on IIS has always been an easy task. In this blog, you would encounter the steps to deploy an ASP.NET Core Web API on IIS. APIs are a very good feature provided by .NET and are in very high demand in the current scenario in information technology space.

 

Let’s begin with the steps to deploy an ASP.NET Core Web API on IIS –

 

  • First of all, you need to download and install the latest version of Visual Studio 2019. Also, note that Visual Studio 2017 or earlier versions does not supportASP.NET Core applications and APIs.

Ø Next step is to download the .Net 5 Runtime on your Windows Server.

  • Next thing is to make sure that IIS is enabled on the server. If it is not, please enable the IIS.Go to Windows Server , Open the Server Manager, then go to IIS, then click on the option ‘Add Roles and Features’, then go to features, then check if the Web Server IIS checkbox is selected.If it is not, then select that option in order to install IIS on the server.

  • Next step is to create a new application pool with No Managed Code option selected. Open your IIS manager, then go to Application Pools section, then click ‘Add Application Pool’ option, a dialog box will open, select ‘No Managed Code’ option under the .NET Framework version and give a name to your application pool and finally click Ok.
  • Now create a new website under IIS.From the left-side menu of IIS manager, right-click on sites, then choose ‘Add Website. A dialog box will open, give your website a name, assign it to the newly created application pool (which you created in previous step), and select the physical path of your website’s folder. Also,in the binding section, provide a new binding port for

Ø  Open Visual studio 2019 and create a new project of type ASP.NET Core Web Application. Also, provide it with a name and the folder path.

Ø  Next step is to configure your newly created project in Visual Studio.

Ø  Next step is to configure your newly created project in Visual Studio.

Ø  Next step is to select API as project template option, then click create button.