I ran into a nasty bug with the latest alpha of WHS Disk Management 1.1; on non-English servers, the DiskManagement service failed to start. No meaningful error was generated, nothing got logged, and no matter what configuration options I changed, the service wouldn't start. Ever.

How's that for a bug?

Turns out, I was being bit by a localization issue. Who knew that the Authenticated Users group isn't actually named "Authenticated Users" on non-English servers?

Here's the fix. When passing your IDictionary of channel properties to the IpcChannel constructor, make sure you're getting the localized name of the role you're authorizing:

SecurityIdentifier sid = new SecurityIdentifier(WellKnownSidType.AuthenticatedUserSid, null);
NTAccount account = sid.Translate(typeof(NTAccount)) as NTAccount;

IDictionary channelProperties = new Hashtable();
channelProperties["portName"] = portName;
channelProperties["exclusiveAddressUse"] = false;
channelProperties["authorizedGroup"] = account.Value;
channelProperties["typeFilterLevel"] = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;

IpcChannel channel = new IpcChannel(channelProperties, null, null);
posted on Saturday, November 22, 2008 10:19 PM | Filed Under [ Development ]


Site Sections

Recent Posts


Post Categories

WHS Add-In Tutorial

WHS Blogs

WHS Development