Thursday, November 26, 2009

Windows Server 2008 IIS7 SSL Host Header

I’ll start off with the bad.  You cannot set this up using the IIS Manager.  Also, once you have it setup, you can view the settings from the IIS Manager, but if you make any changes, the ssl host header settings will be removed.  Very convenient.

The good news is, once you figure out the command line to set it up, it works great.  I have been using it on a couple of test servers for quite a while now to host different test urls on a single ip address.

Assuming you have IIS setup and a cert ready to use, here are the steps I followed.

1. Go ahead and add an SSL binding with your certificate to the website.  The reason for this is to get the certificate hash and Application ID.  You can also get the certificate hash by viewing the details of the cert.  As for the Application ID, this is the only way I could find to get it.  It is probably also the the IIS metabase xml file as well.

2.  In a command prompt run the following command and save the certhash and appid.

  • netsh http show sslcert

showsslcert 

3.  Change directories in the command window to c:\Windows\System32\inetsrv and run

  • appcmd.exe set config -section:system.applicationHost/sites /+"[name='test.mydomain.com'].bindings.[protocol='https',bindingInformation='127.0.0.1
    443:test.mydomain.com']"
    /commit:apphost

appcmd

  • Note: The name= parameter is the name of the site in IIS manager.

4.  The last step is to bind the ssl certificate to the site.

  • netsh http add sslcert ipport=127.0.0.1:443 certhash=1f5596aa6ed348243056eec325fe1fbc326c2d3a appid="{4dc3e181-e14b-4a21-b022-59fc669b0914}"

addsslcert

  • Note: Make sure you put in the values for certhash and appid that you copied earlier.

Finally, the end result….

iis

Labels:

Friday, November 13, 2009

TFS 2008 Remove Alerts

Today I had the need to remove alerts for a user no longer on the project.  It is easy to edit build alerts/notifications using Team Explorer or the TFS Power Tools.  But, I could not find a way to remove Work Item alerts for a user.  Maybe I was missing something simple, but I like to think I wasn’t.  Plus, with the user being a contractor, the email address that was used was not in exchange or tied to the domain account.  After some digging around, I found where TFS stores alert subscriptions in the database and simply deleted the rows.  I found them at

TfsIntegration.dbo.tbl_subscription

So far, this appears to work.  I anyone has a better/cleaner way, I would love to hear about it.