Change name that is default in IIS after PORT:80

Viewed 70

I want to change the name that is default while the project setup runs through the IIS.

This is my default name OData :

I want to change it like :

http://localhost/ODataAPI/

How could I change this?

3 Answers
  • Click on your site/application.

  • on the right panel click on basic settings.

  • here you can change the name.

You can create a virtual directory of that name.. Right-Click on your Project and select Properties, and then you web and then checked Override application root URL and then Change.

in file program.cs

public class Program
    {
        public static void Main(string[] args)
        {
            BuildWebHost(args).Run();
        }

        public static IWebHost BuildWebHost(string[] args) =>
            WebHost.CreateDefaultBuilder(args)
                .UseStartup<Startup>()
                .UseUrls("http://localhost:4000")
                .Build();
    }

use for dotnet core

Related