0

how do I find out the registry keys, which the SpeechSynthesizer is using. I need to add them with RegistryPermission so I can use SpeechSynthesizer again.

I denied in my own appdomain every access as standard and added the following ones so I think I need only the RegistryPermission but I have no clue how to get them.

var grants = new PermissionSet(PermissionState.None);
grants.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution));
grants.AddPermission(new SecurityPermission(SecurityPermissionFlag.SerializationFormatter));
grants.AddPermission(new SecurityPermission(SecurityPermissionFlag.Infrastructure));        
grants.AddPermission(new EnvironmentPermission(EnvironmentPermissionAccess.Read, "USERNAME"));
grants.AddPermission(new FileIOPermission(FileIOPermissionAccess.AllAccess, Assembly.GetExecutingAssembly().Location));
grants.AddPermission(new ReflectionPermission(PermissionState.Unrestricted));                
grants.AddPermission(new UIPermission(PermissionState.Unrestricted));

Thanks in advance.

user3595889
  • 1
  • 1
  • 4
  • Use SysInternals' Process Monitor to see it accessing the registry keys. Do keep in mind that Speech is built on top of unmanaged code (SAPI), it does not observe sandboxing restrictions. – Hans Passant Apr 18 '15 at 17:04
  • Yes therefore I'm trying currently to find out why I can not use it. The exception trace shows that it tries to open a reg key but it does not mention which one. – user3595889 Apr 18 '15 at 17:06
  • Hmya, Process Monitor shows you which one that is. – Hans Passant Apr 18 '15 at 17:15

0 Answers0