Posts tagged Windows

WCF and the SYSTEM account

While trying to move an NT Service over to its own account I hit the following WCF error:-

Exception Alert : System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http://+:8082/home/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). —> System.Net.HttpListenerException: Access is denied at System.Net.HttpListener.AddAllPrefixes() at System.Net.HttpListener.Start() at System.ServiceModel.Channels.SharedHttpTransportManager.OnOpen()

The referenced article wasn’t much help but a quick web search led to this article on MSDN which has a better explanation and two ways to solve the problem.  Unfortunately neither is ‘simple’.  In the end I used the source code, built a new .EXE and added it to my setup code.
Seems odd that the SYSTEM account could do this just fine but the safer account I created to run the service cannot.  Why isn’t there a security group for this that I can just add my user to and be done?

Take out the trash!

When I shut my laptop down it takes forever to get from selecting Shutdown on the menu to it actually asking what kind of shutdown I wanted. A quick look at filemon revealed the problem – on shutdown Windows is scanning every file in the recycle bin. And having just deleted a very large source tree with thousands of files that scan was taking forever.

After taking out the trash my laptop now shuts down at a more normal rate.