1

I have a website built in MVC and hosted on IIS 7 and all is good with the world.

However, I've now been tasked with adding some additional MVC pages to this site which were built by a third-party contractor. I'll be getting a VS solution, about which I've been told nothing, and I'm going to have to integrate the two quickly.

I have been asked not to try integrating the two into a single VS solution and re-deploy that. It's felt the risk is too great. Instead I'm investigating whether it's possible to install the two as separate websites in IIS but have them both on the same bindings.

Testing this scenario suggests this may be impossible: if I try to assign two websites the same IP address and bindings, only one will start.

Is there any way round this by fiddling with the host name, or being clever with virtual directories and suchlike. Alternatively, is it doable if I put both .dll's in the bin folder and merge the Views folder? Or anything else?

Bob Tway
  • 9,301
  • 17
  • 80
  • 162

1 Answers1

0

From your question, it appears that both apps are part of the same web site. In this case, you do not need to configure multiple sites with IP bindings. You just need to add a context when deploying your application to IIS.

hostname:80
--/index.html
----/your-app/ (deployed from your application)
----/their-app/ (deployed from their application)

If they are different .NET versions, then you may need to configure application pools. See Can One IIS WebSite host multiple Web Applications of different ASP.NET versions?

Update: Here are the pics:

Add first application to site on context their-app

Add second application to site on context your-app

Community
  • 1
  • 1
Akber Choudhry
  • 1,755
  • 16
  • 24
  • Thanks for this. I'm not able to deploy from VS - could you elaborate slightly on what you mean by "context" here, please? The code for the two apps is separate and so needs to be kept in separate folders below the root. – Bob Tway Nov 23 '16 at 10:33