Question

I am working with a demo Visual Studio solution, which has two WebApi projects.

Going through the client code, I can see it calls the two WebApi's on separate endpoints, as below:

public const string WebHostName = "web.local";
public const string WebHostv1Path = "/rs/api/";
public const string WebHostv2Path = "/rs2/api/";

public const string WebHostv1BaseAddress = "https://" + WebHostName + WebHostv1Path;
public const string WebHostv2BaseAddress = "https://" + WebHostName + WebHostv2Path;

So what I need to do is setup of two WebApi apps under same host name in sub folders/paths, but as far as I can tell each 'site' can only run one application.

Any points on how I can achieve the above with IIS8?

Was it helpful?

Solution

In iis you can have a Site with many sub-Applications. Per iis.net:

In IIS 7 and above, each site must have an application which is named the root application, or default application. However, a site can have more than one application. For example, you might have an online commerce Web site that has several applications, such as a shopping cart application that lets users gather items during shopping and a login application that allows users to recall saved payment information when they make a purchase.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top