Archive for April, 2011

How to Remove unused Application Pools using ServerManager Class

Public Sub RemoveUnusedApplicationPools()
        Dim manager As New ServerManager
        Dim AppPools As New List(Of String)
        ' fill the list with all pools
        For Each apppool As ApplicationPool In manager.ApplicationPools
            AppPools.Add(apppool.Name)
        Next
 
        ' if it's used remove from the total list
        For Each website As Site In manager.Sites
            For Each app As Application In website.Applications
                AppPools.Remove(app.ApplicationPoolName)
            Next
        Next
 
        ' remove the unused pools
        For Each unusedApplicationPool As String In AppPools
            Dim apppool As ApplicationPool = manager.ApplicationPools(unusedApplicationPool)
            manager.ApplicationPools.Remove(apppool)
        Next
 
        ' call the commitchanges method
        manager.CommitChanges()
        manager.Dispose()
    End Sub

DevExpress How to Enable Form Skins

DevExpress WinForm Skins

DevExpress WinForm Skins

I just realized something about the Skins. Actually it is not enough to add XtraForm (DevExpress Form) to your project and then drag & drop DefaultLookAndFeel. Oh no! If you want your forms appear with skins applied you have to do something more.

No big deal, but if you don’t know this you’ll probably struggle with it.  Read the rest of this entry »