Hi,
By default the ArcGIS Runtime API will first look for your developer license which is established when running the Software Authorization Wizard immediately after the installation. It's possible your central developer license file may now contain the old, expired licenses in addition to the new extended licenses. In order to resolve this you should:
#1. Copy/backup your existing keycodes file:
64-bit OS: "C:\Program Files (x86)\ESRI\License10.1\sysgen\keycodes"
32-bit OS: "C:\Program Files\ESRI\License10.1\sysgen\keycodes"
#2. Open the keycodes file in a text editor and delete the expired license strings
#3. Try your application without the SetLicense call.
#4. If this doesn't work, try rerunning the Software Authorization Wizard (accessed from the start menu > ArcGIS > Runtime SDK 1.0 for WPF > Runtime Tools) providing your new license file.
The license warning message displays when you are setting a developer/test license string. Calling the SetLicense method will override your developer license file but only needs to be used in testing scenarios where the deployment machine does not have a central developer license.
Cheers
Mike