0

I may have several installations of my ASP.NET web app on a single IIS. I need to somehow differentiate among them from a .NET service running on the same Windows machine. What would be the best way to do it?

c00000fd
  • 20,994
  • 29
  • 177
  • 400
  • 1
    Check this: [How to programmatically get sites list and virtual dirs in IIS 7?](http://stackoverflow.com/questions/2555668/how-to-programmatically-get-sites-list-and-virtual-dirs-in-iis-7) – Thomas C. G. de Vilhena Jun 24 '13 at 10:26
  • @ThomasC.G.deVilhena: Thanks. I was thinking to use virtual directories as IDs. Say, to compute a SHA1 hash on them. Just one question. Once installed, a web app won't "migrate around" on the actual hard drive on the server, will it? – c00000fd Jun 25 '13 at 01:29
  • The physical path of Web applications hosted in IIS can be changed at any time, but only if you explicit tell IIS to do so. You can rest assured it won't change by itself overnight. – Thomas C. G. de Vilhena Jun 25 '13 at 11:34

1 Answers1

0

The easiest thing to do would be to make sure that each instance of your application has both a unique application pool and application name to be able to separate them from what I'm assuming is a .net web service / wcf. At the very least you need to make sure your application names are all unique.

Marqueone
  • 1,165
  • 2
  • 14
  • 33