F
fabrice
Hello
I have a little problem by reading personal registry key. I get an error
System.NullReferenceException even if the key exist.
This is my code.
Dim objKey As RegistryKey
objKey = Registry.CurrentUser.OpenSubKey _
("Secure\test", False)
response.Write(Convert.ToString(objKey.GetValue("mytest", "")))
---- If i try to read another key like this, i works fine !
Dim objKey As RegistryKey
objKey = Registry.LocalMachine.OpenSubKey _
("SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName" _
, False)
response.Write(Convert.ToString(objKey.GetValue("ComputerName",
"")))
The problem exist only when i create news keys. I don't know why ?
It is acl problem ?
thanks for your help.
fabrice
I have a little problem by reading personal registry key. I get an error
System.NullReferenceException even if the key exist.
This is my code.
Dim objKey As RegistryKey
objKey = Registry.CurrentUser.OpenSubKey _
("Secure\test", False)
response.Write(Convert.ToString(objKey.GetValue("mytest", "")))
---- If i try to read another key like this, i works fine !
Dim objKey As RegistryKey
objKey = Registry.LocalMachine.OpenSubKey _
("SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName" _
, False)
response.Write(Convert.ToString(objKey.GetValue("ComputerName",
"")))
The problem exist only when i create news keys. I don't know why ?
It is acl problem ?
thanks for your help.
fabrice