IIS 7.5 and IIS 8.0 European Hosting

BLOG about IIS 7.5 Hosting, IIS 8.0 Hosting and Its Technology - Dedicated to European Windows Hosting Customer

IIS Hosting Europe - HostForLIFE :: How to Start and Stop Only One Application Under the Website Root Node?

clock March 4, 2024 09:14 by author Peter

How can I start and stop only one application under a website's root node?

 
Procedure

Open IIS by typing "inetmgr" into the Run box and clicking OK, as seen in the figure below.

The IIS window will be opened.
Create a new application pool for the application that you want to stop. Right-click on Application Pool then select New -> Application Pool as shown in the following image.

Provide the appropriate name to your application pool and keep the other settings that are the defaults in the window, as shown in the following image. Click OK.

Your application pool will be created now as shown in the following image. You can observe that there is no application related to this newly created application pool. See the right-hand side. It is showing that “There are no items to shown in this view.”.


Now you need to relate this newly created application pool to the application that you want to stop. Select the application that you want to stop. Right-click then select Properties. See the following image. The following window will be opened as shown in the following image.

Click on the Create button.
 
Automatically Application Name will be enabled by IIS and it is the name of the application by default for which you are doing this activity. You can change it as you prefer. Also, the Application Pool dropdown is now enabled.
 
Now select the Application Pool that you created earlier from the Application Pool dropdown list as shown in the following image.

Click OK.
Now to stop that only application, right-click on the Application Pool name then select Stop as shown in the following image.


To start the application, right-click on the Application Pool name then select Start. In this way, you can start and stop only one application under IPlanetWebsite in which many applications are deployed under it.



IIS Hosting Europe - HostForLIFE :: Publish and Deploy.NET 6 Web Application on IIS and Access Using Ngrok

clock February 22, 2024 07:00 by author Peter

The first step is to sign up for Ngrok and provide your information.

Click to Signup, and after Sign in, download the Ngrok.

Ngrok is downloaded, so extract this folder.

After extracting browse the folder and find the file mentioned below.

Double-clicking the executable file will open up CLI.

Run this command to add authentication on the command prompt.

After executing the above command, authentication will be added for you.

Run the following command for HTTP Tunnel forwarding.


This command will forward port 80, where a locally deployed application can be accessed from the internet.

Now create a new .Net 6 Application for publishing and deploying on IIS and accessing it using Ngrok from the internet.

Select the path for saving the Application files.

Select .NET 6.0 and click on the Create button.


A .NET 6.0 Application is created.

Click to run this Application.

Now Application is running on localhost that is not deployed on IIS yet.

Now select the project and click to publish it.

Select your desired location to publish your application package. As I created a new folder with the highlighted name.

Select the Folder location to publish the application.

Publish Profile is created.

Click to Publish button to Publish the application.

 

Click to Open Folder where application files are published.

You will find the files at the location.

Now open IIS by pressing the Window button and search for IIS that must be already installed on your local machine. If it is not installed, please install and configure it properly for publishing the application locally. Now browse it.

Now right-click on Default Website and click on Add Application.

Give the Application Alias, select the Application pool, and provide the physical path where we published our application.

Now our application has been published on IIS.

Now right-click on the DemoApplication and browse it. You can see that our application is running on IIS with Alias, as it was given before publishing.

Now we want to access this application via ngrok. Copy the URL provided by ngrok.

Now, in the browse window, paste the URL with your published application alias and press enter. You can now view if your application is still responding and operating, as well as its URL. Note: When you run Ngrok again, the URL may change.



IIS Hosting Europe - HostForLIFE :: IIS 10 - Step By Step Guide to create a Self-Signed Certificate

clock December 8, 2023 06:34 by author Peter

I'll walk you through the process of making a self-signed certificate using IIS version 10 in this article.

Describe SSL
The Secure Socket Layer is the Full Form of SSL.

We can protect your customers' data from online thieves using SSL protocol on your website. For instance, an SSL certificate is necessary to secure client data on e-commerce or banking websites that store credit card information.

I hope you now have a basic grasp. Let's use IIS 10 to build a self-signed certificate.
Construct a Self-Signed Certification

Please use IIS to create a self-signed certificate by following the instructions below.

Create a Self-Signed Certificate
Please follow the below steps to create a Self-Signed Certificate using IIS.

Step 1. Go to the Start menu and click on Administrative Tools -> Internet Information Services (IIS) Manager.

Or

Click “inetmgr” in the search bar to open IIS.

2. Select the Internet Information Service (IIS) Manager by clicking on it. Choose the "Server Certificates" option by clicking the name of the server.

Step 3: Press the Server Certificate button. From the menu on the right, choose "Create Self-Signed Certificate."

"Create Self-Signed certification" should be clicked.

Step 4: Name the folder and provide a "Friendly Name" for the certificate's storage.

I selected the “Personal” folder and clicked on the Ok button. A self-Signed certificate will be created.

I'll walk you through attaching this certificate to your website so that it is HTTPS in the future article. I hope you find this material interesting and useful. I appreciate your time.



IIS Hosting Europe - HostForLIFE :: Publishing ASP.NET Core 8 on IIS

clock November 28, 2023 07:20 by author Peter

How do I make ASP.NET Core 8 available on IIS (Internet Information Service)?
This tutorial assumes you already have a pool set up on your Windows Server IIS.


Follow the steps to grasp the methods for publishing ASP.NET Core 8 applications on IIS settings.

You must configure your code to support IIS and the project to run on the target pool's architecture.

Check the inetmgr console, the Advanced setting..., and make sure Enable 32-Bit programs is set to true to see if your pool is running on x86.

Let's get started on the publishing process.

Step 1: Launch your new ASP.NET Core MVC application.

Step 3. I tried to publish and got an error 503. It's normal, this is what we will fix.


Step 4. So I added this code to Program.cs to enable IIS Server options.
builder.Services.Configure<IISServerOptions>(options =>
{
    options.AutomaticAuthentication = false;
});

Step 5. Open the solution configuration, and choose New... from Active solution platform.

Step 6. Choose your architecture pool. It should be the same as the pool on IIS (x86 for 32-Bits).


Step 7. It will look like this.

Step 8. Back to Publish configuration, you need to change for this.

Step 9. But you will get the same error if you try to publish.

Step 10. To fix this, you need to configure your application to run under Windows, adding <TargetFramework>net8.0-windows</TargetFramework>, unload the project and edit it.
<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>net8.0-windows</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <Platforms>AnyCPU;x86</Platforms>
  </PropertyGroup>

</Project>


Step 11. Now, if you open the Properties of your application, you will see that it is enabled to Target OS version 7.0.


Step 12. Now, you need to select the Target Framework: with "net8.0-windows":


Step 13. Before publishing a dotnet, copy the file app_offline.htm to the target IIS installation folder. This turns off the website so this message is displayed if you try to use it:


Step 13.1. Extra source code, Microsoft default source code. If the file name app_offline.htm indicates to dotnet that the execution should be terminated, it automatically redirects to it. You can customize this file as you like.
<!doctype html>
<title>Site Maintenance</title>
<style>
  body { text-align: center; padding: 150px; }
  h1 { font-size: 50px; }
  body { font: 20px Helvetica, sans-serif; color: #333; }
  article { display: block; text-align: left; width: 650px; margin: 0 auto; }
  a { color: #dc8100; text-decoration: none; }
  a:hover { color: #333; text-decoration: none; }
</style>

<article>
    <h1>We&rsquo;ll be back soon!</h1>
    <div>
        <p>Sorry for the inconvenience but we&rsquo;re performing some maintenance at the moment. we&rsquo;ll be back online shortly!</p>
    </div>
</article>

Step 14. Copy the files, then delete the app_offline.htm file to run the application. This is the result.

Conclusion
There are a few steps, but it is essential to follow them to succeed in publishing ASP.NET Core 8 applications.



IIS Hosting Europe - HostForLIFE :: IIS Server is Used to Host and Publish .NET Core 6 Web API Applications

clock November 8, 2023 09:25 by author Peter

Internet Information Service (IIS) is essentially Microsoft's versatile and general-purpose web server that will run on Windows and be used to serve requested files.

Required Tools

  • IIS Manager
  • .NET Core SDK 6
  • Visual Studio 2022


Let’s start
Step 1. Create a new .NET Core Web API Project.

Step 2: Set up your new project.

Step 3: Include details such as the.NET Framework version, Open API, and HTTPS.

Step 4. Project Structure

Step 5: Create the Product Controller and add one endpoint within that class, as well as inspect the other files that are generated by default.

using Microsoft.AspNetCore.Mvc;
namespace WebAPI.Controllers {
    [Route("api/[controller]")]
    [ApiController]
    public class ProductsController: ControllerBase {
        [HttpGet]
        [Route("list")]
        public IDictionary < int, string > Get() {
            IDictionary < int, string > list = new Dictionary < int, string > ();
            list.Add(1, "IPhone");
            list.Add(2, "Laptop");
            list.Add(3, "Samsung TV");
            return list;
        }
    }
}

Program.cs file

var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment() || app.Environment.IsProduction()) {
    app.UseSwagger();
    app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();


Here also, you can see we configure the HTTP request pipeline for both Development and Production Environment.

WebAPI.csproj file
<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
  </ItemGroup>
</Project>


launchSetting.json file
{
  "$schema": "https://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:11254",
      "sslPort": 44315
    }
  },
  "profiles": {
    "WebAPI": {
      "commandName": "Project",
      "dotnetRunMessages": true,
      "launchBrowser": true,
      "launchUrl": "swagger",
      "applicationUrl": "https://localhost:7047;http://localhost:5047",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "launchUrl": "swagger",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}


Step 6. Run your application and hit the API endpoint using Swagger UI

Step 7. Check your all IIS Services are running on your system properly or not. If not, then open the control panel go to the program and features, and click on Turn Windows Feature on or off.

 

Apply the changes as I showed you in the above image. Click on apply and then restart your computer

Step 8. After restarting your computer will see IIS Manager in the search box and open it.

Now, check your running IIS using localhost in the browser

Step 9. Install ASP.NET Core 6.9 Runtime – Windows Hosting Bundle Installer

    Windows hosting bundle installer

Step 10. Now, we are going to publish our application for that; right-click on WebAPI Project and click on Publish


As you see, it will take the default path, so change that path to c:\inetpub\wwwroot\publish after creating the publish folder over there

Step 11. Here you can see all the configurations related to publishing, like path and some environmental variables, and later on, click on Publish

Step 12. Open IIS Manager and create a new Web Application after right click on the sites

Step 13. Click on Web API, and on the right side, you can see the browse option, so click on that and open the application inside the browser


Step 14. In the browser, when you hit the Web API endpoint using Swagger, then will see the following list of products as an output

Conclusion
In this article, we discussed.NET Core 6 Web API hosting and publishing using IIS, as well as associated topics step by step. I hope you comprehend everything.



IIS Hosting Europe - HostForLIFE :: Deploy An Angular Application On IIS

clock June 16, 2023 08:55 by author Peter

This article will help every developer who works on Angular. In this article, we are going to see the steps necessary to deploy an Angular application on Internet Information Services (IIS).

What is covered in this article    How to Install IIS.    Create and build an Angular application.    Deploy Angular application on IIS. How to Install IIS
To install IIS, press the Windows + R key combination to bring up a run box. Then, type appwiz.cpl and press Enter.

Now, open the "Program and Features" part of the Control Panel, on the left-hand side, click on the "Turn Windows features on or off" link.

Now, click on the "Internet Information Services" checkbox.

Step 1
Let us create a project using the following command in Command Prompt.
 
ng new IISDemo

Step 2
Open the project in Visual Studio Code using the following command.
cd IISDemo

Step 3
Build the application by using the following command.
ng build --prod --base-href /eapp/

A folder is created in your project folder with a name list. Open C drive, create a new folder named IISDemo, and paste the dist folder content.
Deploy Angular Application on IIS
 
Now, open IIS, press the Windows + R key combination to bring up a run box. Then, type inetmgr and press Enter.
 
Now, IIS will start.

Now, right-click on Sites and click on "Add web sites".


Now, right-click on Demo and click on "Add Application". Fill the alias name and set the physical path.

Now, enable Directory Browsing.
Now, browse to your Angular application.
Right-click on the app, go to Manage Application and click on "Browse".


 

In this article, I have discussed how to deploy an Angular Application on IIS.



IIS Hosting Europe - HostForLIFE :: How To Host Web-App In IIS 10.0?

clock May 16, 2023 07:45 by author Peter

Listed below are the steps to deploy a web app in IIS.


Step 1
Publish your application.
Right click your application and select "Publish".

In the publishing wizard, select the desired file system and set target location.

And now, click Publish button to publish your application to the targeted location. Once the application is published successfully, the following screen appears (if any errors occurs, it will notify  you here).

Step 2
Type inetmgr in the "Run" dialog box to open IIS manager.


And, you will get to the below screen.

Expand the local computer, right click on Sites, and click "Add New Site", as shown below.

Type the name of the website. In my sample, it is "MyWebApp". Select the published file location (you have to manually add this port number to inbound rules of Windows Firewall later). And then, press OK.

If a connection with that port number already exists, then give another port number.

So, change the port number and press OK.
Browse to view the application.

It's hosted on localhost.

If you want to assign IP-address, right click your created site in IIS and select "Edit Binding".

In "Site Bindings" window, click "Edit" and assign IP address.

Now, click OK and type this IP address with port in browser (ex: http://192.168.1.113:91/ ). You will see the following screen.


Now, you can see that our application is hosted with IP Address on IIS successfully.



About HostForLIFE.eu

HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2016 Hosting, ASP.NET Core 2.2.1 Hosting, ASP.NET MVC 6 Hosting and SQL 2017 Hosting.


Tag cloud

Sign in