Carl’s Geek Notes

May 31, 2007

Bach Cantata Pilgrimage Listing

Filed under: Classical Music — Carl @ 1:51 pm

If you’re following the Bach Cantata Pilgrimage with John Eliot Gardiner, the Monteverdi Choir, and the English Baroque Soloists, you’ve no doubt figured out that the volume number has nothing to do with the order of release. I’ll maintain a list here of the releases, volumes, and cantatas contained.

  1. Volume 1: London
    • The Feast of St. John the Baptist
      • BWV 167, “Ihr Menschen, ruhmet Gottes Liebe”
      • BWV 7, “Christ unser Herr zum Jordan kam”
      • BWV 30, “Freue dich, erloste Schar”
    • 1st Sunday after Trinity
      • BWV 75, “Die Elenden sollen essen”
      • BWV 20, “O Ewigkeit, du Donnerwort”
      • BWV 39, “Brich dem Hungrigen dein Brot”
  2. Volume 8: Bremen & Santiago
    • 15th Sunday after Trinity
      • BWV 138, “Warum betrubst du dich, mein Herz”
      • BWV 99, “Was Gott tut, das is wohlgetan”
      • BWV 51, “Jauchzet Gott in allen Landen!”
      • BWV 100, “Was Gott tut, das is wohlgetan”
    • Cantatas for the 16th Sunday after Trinity
      • BWV 161, “Komm, du susse Todesstunde”
      • BWV 27, “Wer weiss, wie nahe mir mein Ende!”
      • BWV 8, “Liebster Gott, wann werd ich sterben?”
      • BWV 95, “Christus, der ist mein leben”
  3. Volume 24: Altenburg & Warwick
    • 3rd Sunday after Easter
      • BWV 12, “Weinen, Klagen, Sorgen, Zagen”
      • BWV 103, “Ihr werdet weinen und heulen”
      • BWV 146, “Wir mussen durch viel Trubsal in das Reich Gottes eingehen”
    • 4th Sunday after Easter
      • BWV 166, “Wo gehest du hin?”
      • BWV 108, “Es ist euch gut, dass ich hingehe”
      • BWV 117, “Sei Lob und Ehr dem hochsten Gut”
  4. Volume 10: Potsdam & Wittenburg
    • 19th Sunday after Trinity
      • BWV 48, “Ich elender Mensch, wer wird mich erlosen”
      • BWV 5, “Wo soll ich fliehen hin”
      • BWV 56, “Ich will den Kreuzstab gerne tragen”
    • 25th Sunday after Trinity
      • BWV 90, “Es reisset euch ein schrecklich Ende”
    • Cantatas for the Feast of the Reformation
      • BWV 79, “Gott der Herr ist Sonn und Schild”
      • BWV 80, “Ein feste Burg ist unser Gott”
    • Occasion Unspecified
      • BWV 192, “Nun danket alle Gott”
  5. Volume 14: New York
    • Christmas Day/Second Day of Christmas
      • BWV 91, “Gelobet seist du, Jesu Christ”
      • BWV 121, “Christum wir sollen loben schon”
      • BWV 40, “Dazu ist erschienen der Sohn Gottes”
      • BWV 110, “Unser Mund sei voll Lachens”
  6. Volume 19: Greenwich & Romsey
    • 2nd Sunday after Epiphany
      • BWV 155, “Mein Gott, wie lang, ach lange?”
      • BWV 3, “Ach Gott, wie manches Herzeleid I”
      • BWV 13, “Meine Seufzer, meine Tranen”
    • 4th Sunday after Epiphany
      • BWV 81, “Jesus schlaft, was soll ich hoffen?”
      • BWV 14, “War Gott nicht mit uns diese Zeit”
    • 24th Sunday after Trinity
      • BWV 26, “Ach wie fluchtig, ach wie nichtig”
    • Motet BWV 227, “Jesu, meine Freude”
  7. Volume 21: Cambridge & Norfolk
    • Quinquagesima
      • BWV 22, “Jesus nahm zu sich die Zwolfe”
      • BWV 23, “Du wahrer Gott und Davids Sohn”
      • BWV 127, “Herr Jesu Christ, wahr’ Mensch und Gott”
      • BWV 159, “Sehet! Wir gehn hinauf gen Jerusalem”
    • Palm Sunday/Annunciation
      • BWV 182, “Himmelskonig, sei willkommen”
    • 3rd Sunday in Lent, “Oculi
      • BWV 54, “Widerstehe doch der Sunde”
    • Feast of the Annunciation
      • BWV 1, “Wie schon leuchtet der Morgenstern”
  8. Volume 26: Long Melford
    • Whit Sunday
      • BWV 34, “O ewiges Feuer, o Ursprung der Liebe”
      • BWV 59, “Wer mich liebet, der wird mein Wort halten I”
      • BWV 68, “Also hat Gott die Welt geliebt”
      • BWV 74, “Wer mich liebet, der wird mein Wort halten II”
      • BWV 172, “Erschallet, ihr Lieder, erklinget, ihr Saiten!”
      • BWV 173, “Erhohtes Fleisch und Blut”
      • BWV 174, “Ich liebe den Hochsten von ganzem Gemute”
  9. Volume 7: Abbaye d’Ambronay & Bremen
    • 14th Sunday after Trinity
      • BWV 25, “Es ist nichts Gesundes an meinem Leibe”
      • BWV 78, “Jesu, der du meine Seele”
      • BWV 17, “Wer Dank opfert, der preiset mich”
    • Feast of St. Michael and All Angels
      • BWV 50, “Nun ist das Heil und die Kraft”
      • BWV 130, “Herr Gott, dich loben alle wir”
      • BWV 19, “Es erhub sich ein Streit”
      • BWV 149, “Man singet mit Freuden vom Sieg”
  10. Volume 15: New York
    • 3rd Day of Christmas
      • BWV 151, “Susser Trost, mein Jesus kommt”
      • BWV 133, “Ich freue mich in dir”
      • BWV 64, “Sehet, welch eine Liebe hat uns der Vater erzeiget”
    • 2nd Day of Christmas
      • BWV 57, “Selig ist der Mann”
  11. Volume 22: Eisenach
    • Easter Sunday
      • BWV 4, “Christ lag in Todesbanden”
      • BWV 31, “Der Himmel lacht! die Erde jubliliert”
    • Easter Monday
      • BWV 66, “Erfreut euch, ihr Herzen”
      • BWV 6, “Bleib bei uns, denn es will Abend werden”
    • Easter Tuesday
      • BWV 134, “Ein Herz, das seinen Jesum lebend weiss”
      • BWV 145, “Ich lebe, mein Herze, zu deinem Ergotzen”
  12. Volume 23: Arnstadt & Echternach
    • 1st Sunday after Easter
      • BWV 150, “Nach dir, Herr, verlanget mich”
      • BWV 67, “Halt im Gedachtnis Jesum Christ”
      • BWV 42, “Am Abend aber desselbigen Sabbats”
      • BWV 158, “Der Friede sei mit dir”
    • 2nd Sunday after Easter
      • BWV 104, “Du Hirte Israel, hore”
      • BWV 85, “Ich bin ein guter Hirt”
      • BWV 112, “Der Herr ist mein getreuer Hirt”

Changing Device Name in Safely Remove Hardware applet

Filed under: Gadgets, iPod, Windows Administration — Carl @ 11:36 am

Once you have a few USB devices (say, an external drive, a flash drive, and an iPod), it’s difficult to tell at a glance which one you’re using when you go to the Safely Remove Hardware applet because they all say USB Mass Storage Device.

Safely Remove Hardware applet

You can give a more descriptive name by changing it with the registry editor.  Here’s how:

Look in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB.  You’ll see entries for items like Vid_0781&Pid_5406.  Start with the first one and expand it; you’ll see a key under it like 0000060328042087.  Click on the key and look at the LocationInformation value under it.  You’ll see a friendlier name there:

USB Device in Registry Editor

You may have to expand several to find the device that you want.  Once you’ve done so, you’ll need to right-click on the key, choose Permissions, and allow Full Control for Everyone to be able to edit it.  Double-click Device Description and enter a new description in the dialog box:

Dialog for changing device name

Now your Safely Remove Hardware screen looks sensible:

Safely Remove Hardware applet

May 29, 2007

WSE Authentication Error when using a proxy or web farm

Filed under: C#/.NET, Computers, Programming, Web Services, WSE — Carl @ 8:55 am

When going into a production environment, I discovered that WSE was throwing the following exception:

System.Web.Services.Protocols.SoapException: SOAP-Fault code:http://schemas.xmlsoap.org/ws/2004/08/addressing:DestinationUnreachable Message: Microsoft.Web.Services3.Addressing.AddressingFault: Destination Unreachable ---> System.Exception: WSE846: The <wsa:To> header must match the actor URI value of the web service. The actor URI value can be explicitly specified using SoapActorAttribute on the ASMX class. In the absence of the attribute, the actor URI is assumed to be equal to the HTTP Request Url of the incoming message. The <To> header received contained
http://MySite/MyService.asmx
while the receiver is expecting
http://MySite/MyService.asmx?StuffAddedByProxyToQueryString
. --- End of inner exception stack trace ---

The problem was that the firewall functions as a proxy server and adds some stuff to the query string of the request, making them not match.  The packets were signed by the client with the base URL and the server received the URL that had been munged by the proxy server.

The solution was very simple, I added the following attribute:

[Microsoft.Web.Services3.Messaging.SoapActor("*")]

to my service and it disabled that check.  According to Zach Bonham, the same result should be expected when using a load-balanced web farm.  He also observes “but it seems like I’ve lost some of the functionality of why I chose WSE in the first place,” and I definitely agree with that.

May 16, 2007

Error using svcutil.exe to generate proxy classes from WCF service

Filed under: C#/.NET, Computers, Programming, WCF, Web Services — Carl @ 2:17 pm

While using svcutil.exe to generate proxy classes for a WCF client application, I got the following error:

C:\>svcutil.exe
http://localhost:2338/MyService/Service.svc?wsdl

Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.30]
Copyright (c) Microsoft Corporation. All rights reserved.
Attempting to download metadata from 'http://localhost:2338/MyService/Service.svc?wsdl' using WS-Metadata Exchange or DISCO.
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: Object reference not set to an instance of an object.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://my.services']/wsdl:portType[@name='IMyService']
Error: Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://my.services']/wsdl:portType[@name='IMyService']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://my.services']/wsdl:binding[@name='WSHttpBinding_IMyService']
Error: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://my.services']/wsdl:binding[@name='WSHttpBinding_IMyService]
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://my.services']/wsdl:service[@name='MyService']/wsdl:port[@name='WSHttpBinding_IMyService']

Generating files...
C:\MyService.cs

I found this posting (See Hao Xu's post towards the bottom) suggesting that it is the difference between XmlSerializer and XmlFormatter.  Once I called svcutil.exe with the /serializer:XmlSerializer parameter, it generated my classes with no trouble.

May 3, 2007

Returning the identity value from SQL Server to .NET

Filed under: C#/.NET, Computers, Programming, SQL Server — Carl @ 6:48 am

David Hayden has a good post about getting the value of the identity column in a SQL Server after inserting data in .NET.  Basically you append ” SET @Key = SCOPE_IDENTITY()” to your insert statement, create a parameter for @Key, set the parameter’s direction to be Output, and read the value back.

Of special note is that he used the SQL Server Profiler to watch how a DataGridView did the operation.  The control ran the INSERT statement and then ran SELECT MyKey, MyField1, MyField2 FROM MyTable WHERE MyKey = SCOPE_IDENTITY().  That method also retrieves defaults, calculated fields, and fields affected by triggers so that your view in code matches what is in the database.

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.