Thursday, March 26. 2009
WCF Peer-To-Peer (PNRP) under Windows Server 2008
Some days ago on my job I was in charge of extending a legacy .net application to be able to run synchronously on serveral windows server 2008 (standard edition) hosts.
This had to be implemented because of changes to the underlaying host topology (in fact, an standalone webserver was turned into a server farm).
I decided to create a new interface DLL as an adapter to the existing app and use the Microsoft WCF (or "dot-c-f", as they like to call it) API to the PNRP service.
The use of a peer-to-peer architecture made the changes lightweight.
The development of the WCF Interface under windows vista (my development box) went quite well and worked almost immediately.
But the problems came up when I deployed the whole thing to my to win2008 hosts. No peer-to-peer communication was possible, and – even worse – the peers didn't even change their state to "connected" (meaning in microsoft speach that they aren't "alone"), although a connection via TCP and IPv6 was possible between both of the hosts.
This lead my search torwards searching for an infrastructure problem. After googling several results saying that PNRP wasn't possible under win2008 - which I couldn't imagine myself - the solution was finally pretty simple: you just have to install and enable three needed windows services:
1. peer name resolution server (install via server management center as new feature)
2. peer discovery server (same point as above)
3. (not mentioned by MSDN!) the SSDP Service has to be enabled and startet. It is not startet automatically with the PNRP service as there is no service dependency! (Simply change the service start option to Automatically.)
Be sure that all three services are running (and are startet upon system startup) and all your hosts will automagically go into the "connected" state on the LinkLocal-Peer-To-Peer-Cloud.
If you don't know what the SSDP Service is good for: don't mind, I don't either. When you're looking at Wikipedia you will find that SSDP stands for "Simple Service Discovery Protocol" and it is usually used for UPnP Device Discovery. Seems like some creative microsoft programmer decided to use this service in WCF without documenting it!
Finally two more hints, if you're new to WCF P2P Programming:
This had to be implemented because of changes to the underlaying host topology (in fact, an standalone webserver was turned into a server farm).
I decided to create a new interface DLL as an adapter to the existing app and use the Microsoft WCF (or "dot-c-f", as they like to call it) API to the PNRP service.
The use of a peer-to-peer architecture made the changes lightweight.
The development of the WCF Interface under windows vista (my development box) went quite well and worked almost immediately.
But the problems came up when I deployed the whole thing to my to win2008 hosts. No peer-to-peer communication was possible, and – even worse – the peers didn't even change their state to "connected" (meaning in microsoft speach that they aren't "alone"), although a connection via TCP and IPv6 was possible between both of the hosts.
This lead my search torwards searching for an infrastructure problem. After googling several results saying that PNRP wasn't possible under win2008 - which I couldn't imagine myself - the solution was finally pretty simple: you just have to install and enable three needed windows services:
1. peer name resolution server (install via server management center as new feature)
2. peer discovery server (same point as above)
3. (not mentioned by MSDN!) the SSDP Service has to be enabled and startet. It is not startet automatically with the PNRP service as there is no service dependency! (Simply change the service start option to Automatically.)
Be sure that all three services are running (and are startet upon system startup) and all your hosts will automagically go into the "connected" state on the LinkLocal-Peer-To-Peer-Cloud.
If you don't know what the SSDP Service is good for: don't mind, I don't either. When you're looking at Wikipedia you will find that SSDP stands for "Simple Service Discovery Protocol" and it is usually used for UPnP Device Discovery. Seems like some creative microsoft programmer decided to use this service in WCF without documenting it!
Finally two more hints, if you're new to WCF P2P Programming:
- Better turn off the windows firewall, as it is blocking the IPv4 to V6 Teredo tunneling driver. Be sure that IPv6 is supported by your network infrastructure, as it is mandatory for the PNRP protocol.
- Don't forget a config flag in your app to disable the p2p functions, as there will always be a collegue that is wondering where the heck these "random" informations came from (if he's not aware of other peers running in the same cloud, doing some crazy buggy stuff).
Saturday, March 14. 2009
Windows Vista Recovery CD
I recently changed (i.e. enlarged) the size of my Windows Vista boot partition.
Without thinking, I hibernated my system afterwards...
This seems not to be the best idea, as the result was an infinite loop booting:
Directly after the MBR chainloading the windows partition (no matter wheter it was grub, a basic mbr from linux "install-mbr" or whatever) the screen turned black and the system started over again with the POST.
The reason was that it seems like the partition ID had changed.
If you have a Windows Vista Installation CD/DVD at hand - no problem:
Insert, select "repair" at the screen with the big "install" button and answer "yes" to the question: "should I fix your boot problems and restart the system?" - so easy.
I recommend doing a CHKDSK run after this!
But what if you don't have a bootable Vista CD at hands (e.g. you got an OEM version without recovery disc)?
Well, The NeoSmart Files blog is your rescure:
At http://neosmart.net/blog/2008/windows-vista-recovery-disc-download/ you can find a torrent download of an official (?)
Microsoft Vista recovery disc which seems to be an installation disc that only supports recovery, but not installation.
With a total size of only 120MB, this is a real alternative of downloading a complete Windows Vista DVD!
finally, my system is running again – although I lost some files: my opera config and my pidgin accounts file seem gone...
Without thinking, I hibernated my system afterwards...
This seems not to be the best idea, as the result was an infinite loop booting:
Directly after the MBR chainloading the windows partition (no matter wheter it was grub, a basic mbr from linux "install-mbr" or whatever) the screen turned black and the system started over again with the POST.
The reason was that it seems like the partition ID had changed.
If you have a Windows Vista Installation CD/DVD at hand - no problem:
Insert, select "repair" at the screen with the big "install" button and answer "yes" to the question: "should I fix your boot problems and restart the system?" - so easy.
I recommend doing a CHKDSK run after this!
But what if you don't have a bootable Vista CD at hands (e.g. you got an OEM version without recovery disc)?
Well, The NeoSmart Files blog is your rescure:
At http://neosmart.net/blog/2008/windows-vista-recovery-disc-download/ you can find a torrent download of an official (?)
Microsoft Vista recovery disc which seems to be an installation disc that only supports recovery, but not installation.
With a total size of only 120MB, this is a real alternative of downloading a complete Windows Vista DVD!
finally, my system is running again – although I lost some files: my opera config and my pidgin accounts file seem gone...
Thursday, March 12. 2009
Killerspiele sind an allem Schuld!
Angesichts des jüngsten Amoklaufs in Winnenden – den ich in keinster Weise gutheißen oder verharmlosen will – stürzen sich Politiker und Medien natürlich auf die Suche nach den Ursachen.
Was bietet sich da an, als mal wieder die sogenannten „Killerspiele“ herzunehmen.
Continue reading "Killerspiele sind an allem Schuld!"
Was bietet sich da an, als mal wieder die sogenannten „Killerspiele“ herzunehmen.
Continue reading "Killerspiele sind an allem Schuld!"
Sunday, March 8. 2009
Where I go?
Whereigo is a rather new variant of the classic Geocaching GPS trash hunting game.
Sadly, Groundspeak (the Geocaching.com operator) didn't manage it until now to present a player for the wherigo "catridges" for java enabled phones. Currently, only Windows CE and the Garmin Orgegon are supported by Wherigo.
Now for the happy part:
I found a Thread in the Groundspeak forums about OpenWIG. This is an evolving project that builds a wherigo player for j2me (java for mobile phones). Many cartridges already run with the player, many don't. But give it a try, you have good chances. I hope all the best for this project.
So long, I don't have more time to write because my Nokia E66 pulls be out to play
(For those who missed the download link above:
Navigate your phone to http://openwig.googlecode.com/files/OpenWIG.jad for a direct installation "over the air" or visit The OpenWIG google code project page with your browser.)
Sadly, Groundspeak (the Geocaching.com operator) didn't manage it until now to present a player for the wherigo "catridges" for java enabled phones. Currently, only Windows CE and the Garmin Orgegon are supported by Wherigo.
Now for the happy part:
I found a Thread in the Groundspeak forums about OpenWIG. This is an evolving project that builds a wherigo player for j2me (java for mobile phones). Many cartridges already run with the player, many don't. But give it a try, you have good chances. I hope all the best for this project.
So long, I don't have more time to write because my Nokia E66 pulls be out to play
(For those who missed the download link above:
Navigate your phone to http://openwig.googlecode.com/files/OpenWIG.jad for a direct installation "over the air" or visit The OpenWIG google code project page with your browser.)


/* Comments */