Sonar can mess with MIDI devices. So what is shown in "MIDI" preferences does not correspond to the Windows devices Sonar really listen/send.
* Try to disable all and then enable again.
* If does not work, remove TTSSEQ.INI in the %APPDATA%\Cakewalk\<you sonar version>.
* If still no luck, remove not existing (hidden) MIDI devices in the Windows device manager (there is an option to show disconnected devices).
* If still no luck, remove device in question (in the device manager) and then reinstall it.
Well, the advise with SO3 is not bad. Or try Reaper, you can try to open your Sonar projects in it