How to host FastReport ASP .NET Core application in IIS Windows Server 2012

2021-09-28

To host the created applications on Internet servers, you need a web server. Today we will launch our web application on IIS (Internet Information Services). It is a web server for hosting sites on the Internet. It is more often used to host web servers under server operating systems with a Windows kernel.

First, we will create the application on ASP .NET Core with the FastReport.Web library or simply use the FastReport.Core.Web21.MVC demo project from the FastReport application .NET Trial  which is located in the path:

"FastReports\FastReport.Net Trial\Demos\Core\FastReport.Core.Web21.MVC"

We open the project through Visual Studio, build it and run it to make sure everything works:

Running a project before publishing

As you can see, the project works properly. Let's prepare it for publication on iis! We launch "Solution Explorer" and right-click on the project, find "Publish...".

Navigation to the publication settings window

At this stage, select the local storage "\bin\Release\Debug", then click publish. A little patience and ta da, the project is ready to be published on IIS.

Publishing a project

Now let's go to Windows Server 2012 itself. The path is something like this:  Server Manager ->  Local Server -> Roles and Features -> Tasks -> Add Roles and Features.

Navigation to the window for adding functions

Then a window pops up in which we click Next up to Server Roles. We carefully find the Web Server (IIS) and install it.

Installing the Web Server (IIS)

Now we need to install dotnet hosting from the official site. Follow step-by-step instructions.

Step 1. Select the required .NET version.
Step 2. Find ASP.NET Core Runtime and click on Hosting Bundle. Just download and install - it seems pretty straightforward.

Downloading ASP.NET Core Runtime

Step 3. After installation, go to the console and restart IIS using the command:

"iisreset"

Restarting IIS

Congratulations, IIS is now fully ready to work with ASP .NET Core!

After all these manipulations, go to the C:\inetpub\wwwroot directory on Windows Server 2012. Create a folder with any name inside. Let's say it will be "coretest". Now we add the project files to this folder.

Creating a folder and adding the project

Open IIS Manager using Server Manager, as shown in the picture.

Opening IIS Manager

After opening IIS Manager, you will need to add a new website. Right click on “Sites” and then click on “Add Website”.

Adding a Website

A window should appear where you will need to specify the name, port (if the default port is busy) and the path to the project:

Creating a Website

That's it, we created the website. To view it, just right-click on the created website, then click on Manage Website, and then on Browse.

Launching a published project

Then your project will open in the browser:

Published Website

Let’s sum up. Running your project on Windows Server 2012 is neither scary nor difficult. If you have any questions, contact our support.

October 28, 2024

How to Set Up WSL 2 for Working with FastReport and FastCube

In this article, we will explore how to set up WSL 2 for working with FastReport and FastCube components in Lazarus for Linux.
August 08, 2024

How to install FastReport .NET and its components on Windows

Step-by-step instructions for online and manual installation via the FastReport registration code.NET and its components in Windows.
October 04, 2023

How to generate a report from an ASP.NET Core application using FastReport.Core.Skia

We tell you how to generate a report on Windows and Linux using FastReport.Core.Skia and a private NuGet server.
Fast Reports
  • 800-985-8986 (English, US)
  • +4930568373928 (German)
  • +55 19 98147-8148 (Portuguese)
  • info@fast-report.com
  • 66 Canal Center Plaza, Ste 505, Alexandria, VA 22314

© 1998-2024 Fast Reports Inc.