Search code examples
c#iiswindows-servicesiis-6windows-server-2003

Determine the type of IIS websites


I am writing a windows service in c# which runs on every server containing "Windows Server 2003". Purpose of this service is to check all the IIS websites and their types. For the current scenario, we only have two types, One is php and other is ASP.Net

Is there any way to get that? or any other possible alternate?


Solution

  • IIS web sites don't have a type.

    A site can run both asp.net and php at the same time.

    Just because asp.net and php is enabled for a site, doesn't mean it is actually used.

    So you don't need to look at IIS but at the content files. Do you see *.php, *.aspx or *.cshtml files?

    By looking at the file extensions you should be able to determine what type of technology is used.