Click here to Skip to main content
15,884,388 members
Articles / Web Development / IIS

IIsAdmin.NET: Create Multiple Web Sites Under Windows XP

,
Rate me:
Please Sign up or sign in to vote.
4.70/5 (35 votes)
16 Jun 20052 min read 355.9K   4.1K   123  
Tool for creating multiple web site definitions under Windows XP.
// IIsAdmin.NET
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// 
// This softwareis provided "AS IS" with no warranties of any kind.
// The entire risk arising out of the use or performance of the software
// and source code is with you.
//
// THIS NOTICE MAY NOT BE REMOVED FROM THIS FILE.

using System;
using System.Windows.Forms;
using System.Globalization;

namespace IIsAdmin
{
	/// <summary>
	/// Summary description for ExceptionUtilities.
	/// </summary>
	public class ExceptionUtilities
	{
        public static void DisplayException(Exception ex)
        {
            MessageBox.Show("An error occurred, in most cases performing an IIsReset will correct any issues.  Below are the details of the exception:\n\n" + ex.ToString(), "Exception Encountered", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public static void DisplayValidation(string message)
        {
            MessageBox.Show(message, "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
        }

        public static bool IsNumeric(string expression)
        {
            bool hasDecimal = false;
            for(int i=0;i<expression.Length;i++) 
            { 
                if(expression[i] == '.')
                {
                    if(hasDecimal)
                    {
                        return false;
                    }
                    else // 1st decimal
                    {
                        // inform loop decimal found and continue 
                        hasDecimal = true;
                        continue;
                    }
                }
                // check if number
                if(!char.IsNumber(expression[i])) 
                {
                    return false; 
                }
            } 
            return true; 
        }
	}
}

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior)
United States United States
Senior Application Developer specializing in Windows desktop and network development.

Professional Experience
- B.S. of Computer Science (Graduated 2001 - PSU)
- Senior Application Developer (8+ yrs)
- Microsoft Certified Professional

Primary Interests
- C#, C++, HTML, Javascript
- XML, ASP.NET, Web Services, SOAP, UDDI
- Socket programming and anything network related
- Reflection, Serialization, and Plugin Frameworks
- Owner-drawn controls and GDI+ goodness

Written By
Web Developer
United States United States
.NET Software Developer

Education
- Working towards M.S. Computer Science
- B.S. Computer Science
- B.S. Computer Information Systems
- Minor Mathematics

Professional
- Microsoft Certified Application Developer
- Microsoft Certified Professional
- C# ASP.NET Developer (4 years)

Other Interests
- Flash Remoting
- Video Encoding (Windows Media and Flash Video)
- Microsoft Content Management Server

More Programming Thoughts and Tips
- http://gabewishnie.blogspot.com

Comments and Discussions