views:

392

answers:

1

Oh no, media browser is crashing.

Turns out we have an issue with the way we are creating a mutex. The problem line is:

MutexAccessRule rule = new MutexAccessRule("Everyone", MutexRights.FullControl, AccessControlType.Allow);

Turns out the hardcoded "Everyone" string only works on english OSs, how do we change this line so it works in all languages

+8  A: 

Google is being helpful today:

Looks like this will help

This code solves this problem:

  SecurityIdentifier sid = new SecurityIdentifier(WellKnownSidType.WorldSid, null);
  MutexAccessRule rule = new MutexAccessRule(sid, MutexRights.FullControl, AccessControlType.Allow);
Sam Saffron