How to enable Azure VM IIS hosted website public access

  1. Setup IIS
  2. Confirm able to browse default website locally
  3. Azure Management Portal
  4. Select Virtual Machine
  5. Endpoints
  6. Add HTTP
  7. Confirm able to access the default site from a public web browser
  8. Optionally add FTP, HTTPS ( use for SSL )

Use Microsoft.Data.DataConnectionDialog in your projects to retrieve connection string

This is the use of the Visual Studio connection dialog in your own projects, for instance tool kits to inspect databases. Steps are:

  1. NuGet
  2. Search and add Data Connection (Windows Forms)
  3. Add code, sample is in VB, but C# is similar


Imports Microsoft.Data.ConnectionUI

    Private Sub GetDataConnection()

        Dim dcd As New DataConnectionDialog
        dcd.SelectedDataSource = DataSource.SqlDataSource

        If DataConnectionDialog.Show(dcd) = Windows.Forms.DialogResult.OK Then
            Select Case dcd.SelectedDataProvider.Name
                Case DataProvider.SqlDataProvider.Name
                    Dim cn As New SqlClient.SqlConnection(dcd.ConnectionString)
                    DataSourceToolStripTextBox.Text = cn.DataSource
                    DatabaseDefaultToolStripTextBox.Text = cn.Database
                    'MessageBox.Show(String.Concat("Found SQL: ", cn.ConnectionString))

                Case Else
            End Select
        End If

    End Sub

See also

Change Team Foundation Server – The solution is in a directory mapped to team server …


Project was on one TFS Server and you want to move it to another. In this case to

How did I move the code to a different TFS Server

  1. First unbind the solution projects from the current TFS Server – TODO method
  2. Connected to the new TFS Server
  3. Right-click on Solution – Add solution to source control
    This returned message:
    “Change Team Foundation Server – The solution is in a directory mapped to team server …<the old server>
    Continuing will close the existing team server <the new desired server> and open team server <the old server>. Continue ?
  4. To resolve see steps in: I did not do exactly as stated and instead backed up and then edited the VersionConfig.config:
    Note to self: If I get further problems then delete all the files and folders in the Cache as suggested in this web page
  5. Navigate to %userprofile%\AppData\Local\Microsoft\Team Foundation\3.0\Cache\VersionConfig.config
  6. I removed the whole related <ServerInfo> section, which in my case only had one mapped path.
  7. Appears to have resolved the matter


Find and remove adware on Internet Explorer

Started getting adware underlined hyperlinks on IE today. This directs you to and then on to a web advert

With thanks to

Found in services and msconfig and disabled in both

  1. In RegEdit.exe delete following folder
  2. In Explorer
    %program files (x86)% delete folder Rr Savings
  3. In Explorer
    %program files% delete folder RrFilter
  4. Also in IE > Tools > Manage Add-ons
    Disable Adpeak – RrSavings
    Also More Information – Took a screen shot and noted the ClassID
  5. Searched for the ClassID in RegEdit and deleted it from a few 2-3 places


WPF List Box

ItemTemplate – DataTemplate

            <ListBox ItemsSource="{Binding}">
                            <StackPanel Orientation="Horizontal">
                                    <Style TargetType="TextBlock">
                                        <Setter Property="Margin" Value="0, 0, 5, 0" />
                                <TextBlock Text="{Binding Path=ID}" />
                                <TextBlock Text="{Binding Path=Task1}" />
                                <TextBlock Text="{Binding Path=PercentComplete}" />
                            <TextBlock Text="Resource names here" Margin="50, 0, 0, 0" />
                            <!--<TextBlock Text="{Binding Path=ResourceName}" Margin="50, 0, 0, 0" />-->



        <CollectionViewSource x:Key="taskViewSource" d:DesignSource="{d:DesignInstance my:Task, CreateList=True}">
                <scm:SortDescription PropertyName="CompleteFlag"
                                     Direction="Descending" />


Style DataTrigger

            <ListBox ItemsSource="{Binding}">
                    <Style TargetType="{x:Type ListBoxItem}">
                            <DataTrigger Binding="{Binding Path=CompleteFlag}"
                                <Setter Property="Background"
                                        Value="Yellow" />

Visual Studio 2013 and MSDN – a justification list

A location for me to add justification notes for upgrade to VS 2013 and MSDN Subscription

Visual Studio 2013

  1. WPF improvements
  2. Entity data model wizard – code first from database

MSDN Subscription

  1. Visual Studio online has more facilities including:
    Test cases


Azure Virtual Machines adding virtual hard disks VHD

See also Azure Powershell and Azure VM with SQL

If you have a Pluralsight subscription then they have a good course “Windows Azure Infrastructure as a Service Essentials” then chapter “Storage and Disks” and screen cast “Creating Virtual Hard Disks”

First create a local VHD

  1. Start – “Create and format hard disk partitions”
  2. Action Create VHD
  3. Set location, size, fixed size, OK
  4. Right-click on newly created disk and Initialise
  5. Think MBR – OK
  6. Detach VHD

Upload local VHD to Azure Storage using Azure Powershell

  1. Ensure that you can run local scripts, see Azure Powershell post
  2. Run script:
    add-azurevhd -destination http://<address&gt;<container>/<blobname>.vhd -LocalFilePath :\vhds\VHD01.vhd

Set as Virtual Machines Disk

  1.  Azure management portal
  2. Virtual machines
  3. Disks
  4. Create, enter name, pick from storage, OK

Attach to the Virtual Machine

  1. Azure management portal
  2. Virtual machines
  3. Select machine
  4. Dashboard
  5. Attach – Attach disk
  6. Read/Write
  7. Tick, OK