No failsafe way to do it.
There is a firefox plugin called Server Spy, which will interpret the headers and give you a neat little indicator in the status bar, but if someone has changed the headers, then you are out of luck.
Things like changing the casing of filenames and seeing if you get a 404 can give you a hint as to Apache or IIS, inducing other errors can help here too.
Poking around the source code for a few minutes will often reveal some hints as to the framework, DNN, Drupal, WordPress, all have some telltale signs in the markup, but if the coders have gone out of their way to obfuscate it, then it's really a detective game.