Click here to Skip to main content
15,879,474 members
Articles / Web Development / IIS

Using Managed Code to Detect if IIS is Installed and ASP/ASP.NET is Registered

Rate me:
Please Sign up or sign in to vote.
4.60/5 (15 votes)
30 Dec 2007CPOL4 min read 191.9K   2.6K   75  
Explains how to use managed code to detect which version of Internet Information Services (IIS) is installed and if ASP or ASP.NET is registered.
// ---------------------------------------------------------------------------
// Campari Software
//
// SolutionInfo.cs
//
// Provides a cental location for Assembly attributes. Assembly attributes 
// are values that provide information about an assembly. The attributes are
// divided into the following sets of information: 
//
//    * Assembly identity attributes. 
//    * Informational attributes. 
//    * Assembly manifest attributes. 
//    * Strong name attributes. 
//
// ---------------------------------------------------------------------------
// Copyright (C) 2006-2007 Campari Software
// All rights reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
// FITNESS FOR A PARTICULAR PURPOSE.
// ---------------------------------------------------------------------------
#region namespace references

using System.Reflection;
using System.Runtime.CompilerServices;

#endregion

#region Assembly identity attributes

[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("2.0.*")]

#endregion

#region Informational attributes

[assembly: AssemblyCompany("Campari Software")]
[assembly: AssemblyCopyright("Copyright � 2006-2007 Campari Software. All rights reserved.")]
[assembly: AssemblyTrademark(@"")]
[assembly: AssemblyProduct("Campari Software Common Library for .NET 2.0")]
#endregion

#region Assembly manifest attributes
// Do not use in a globally included SolutionInfo.cs file. The attributes in this
// section apply at an assembly level and should be used in the project specific
// AssemblyInfo.cs files.
#endregion

#region Strong name attributes
// Do not use in a globally included SolutionInfo.cs file. The attributes in this
// section apply at an assembly level and should be used in the project specific
// AssemblyInfo.cs files.
#endregion

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
I am a Microsoft C# MVP, author, speaker, blogger, and software developer. I also created the WP Requests and WinStore Requests sites for Windows Phone and Windows Sotre apps as well as several open source projects.

I've been involved with computers in one way or another for as long as I can remember, but started professionally in 1993. Although my primary focus right now is commercial software applications, I prefer building infrastructure components, reusable shared libraries and helping companies define, develop and automate process and code standards and guidelines.

Comments and Discussions