I want to run this post as a reminder to people building and deploying services. I see people deploy services that require access to a restricted resource. The most common restricted resource is the ability to register a listener on part of the HTTP namespace but this advice applies to any restricted resource. Too often, I see people give their service access to the restricted resource by running the service as an administrative account. Don’t do this. It is a bad idea. Greatly increasing the privileges of your service is almost never the right thing to do.
Instead, only give your service access to the restricted resource. Here are two articles that explain this process for HTTP reservations: Configuring HTTP and Configuring HTTP for Windows Vista. Don’t give your service unnecessary privileges. Don’t give access to the resource to unnecessary people. This may require setting up an appropriate service account identity so that you have more control over the scope of the permission.
As a developer, you should think about how people are going to deploy your services. Write down the instructions for deploying your service correctly. It’s even better if your service automatically sets everything up, but if it can’t then you should just tell the deployer what they should do.
Next time: WCF Performance Comparisons