Having trouble with a registry read
I have a program that reads a value in the registry. When I "Debug" it, it works. When I build and run the EXE I get a Security Error.
Is there something I need to do in the program that allows registry reads?
Here is my code:
key = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\SNAP Systems, Inc\WinSNAP\DefaultSite")
DefaultSite = CType(key.GetValue(""), String)
EDIT:
Exact Error>
Request for the permission of type
System.Security.Permissions.RegistryPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
Thank you
Ron.
PS: I'm not sure (because I'm a NOOBIE) if there is anything else you'll need to know. Please ask and I'll provide.