I was stumped the other day as to why i could not get a 301 redirect in from site.com to www.site.com on IIS 7. After much looking around I found out that you need to enable this feature in the server manager.
Then you need to go back to the IIS node that you want to enable 301 redirect for:
And then set the values for your redirect:
If you notice what is also cool is that it will redirect addresses relative to the domain and not just to the root (i.e site.com/oldfile.htm will redirect to www.site.com/oldfile.htm.
Hope this helps someone, cause it was not very intuitive for me to find out how to do it since the feature was not installed by default.