Check if an IIS website exists with C#

/// <summary> /// Check if a website on the given server exist. /// Check on websitename (ServerComment) is case insensitive. /// </summary> /// <param name=”serverName”>Name of the IIS server e.g. localhost</param> /// <param name=”websiteName”>Name of the website e.g. test</param> /// <returns></returns> public bool DoesWebsiteExist(string serverName, string websiteName) { bool result …

NANT: Build Microsoft VisualStudio solutions and configure environments

I use NANT to build Microsoft VisualStudio solutions and after deploying software with msi packages, I use NANT to configure the environment (Creating WebSite, Virtual Directories, Custom Eventlogs, register services, create folders, create shares etc) More information on NANT can be found, here: http://nantcontrib.sourceforge.net/, including documentation for task, types and …

GetFiles, sorted by Creation DateTime, filtered by include file mask and exclude file mask, including subfolders in C#

The “GetFiles” function, returns all files in the given folder, including subfolders, that match the “includeMask”. The result is sorted by the file CreationTime. The function excludes all files that match the “excludeMask”   To call the function: List<FileInfo> files = FileSystemHelper.GetFiles(@”C:\Windows”,”*.*”, “*.exe”, SortOrder.Ascending, SearchOption.AllDirectories);   The function:/// <summary>/// Get …

SSIS package configuration

We have chosen to use a windows environment variable to hold the path to the *.dtsConfig, which is used to configure the *.dtsx package. – Close all open Microsoft Visual Studio 2005 instances (because changing windows environment variables will have nog effect) – Add a Windows Environment Variable: – start …

Remove ExpandedColunCount and ExpandedRowCount when using Microsoft Exel (*.xml) file as template

When you use a Microsoft Excel "*.xml" file as template for generating Microsoft Excel reports, remove the ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1" x:FullRows="1" from the <Table> tag under the <Worksheet> tag. If you don’t remove these counters a error will occur, because the row and or column count is higher then 1: …