471,073 Members | 1,167 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

Error reading Registry, please very urgent


Hi all

i have this error reading one registry key , can anyone assist me .. please
very urgent

i try in one computer, and work fine, but in other computer it didnīt work
and throws this error ..???
"Request for the permission of type
System.Security.Permissions.RegistryPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed."
USing this function

Public Function ReadProgramValueFromRegistry(ByVal Value As String) As
Object

Dim Reg As Microsoft.Win32.Registry

Dim RegKey As Microsoft.Win32.RegistryKey

RegKey = Reg.LocalMachine.OpenSubKey(APPLICATION_CURRENT_RE G_KEY)

Return RegKey.GetValue(Value)

End Function
Jul 21 '05 #1
2 3350
Joao Santa Barbara <jo****@i24potugal.com> wrote:
i try in one computer, and work fine, but in other computer it didnīt work
and throws this error ..???


Well, it looks like the user you're running it under doesn't have
permission to read that registry key - what happens if you try it with
just regedit?

Also, have a look at the .NET Configuration Wizard, and the permission
settings for Registry. (I don't know much about permission settings, so
you'll have to look in the help for how it all works.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
thks for the help
i have adjust the permitions for the mscrolib .. :)

thks alot
JSB
"Jon Skeet" <sk***@pobox.com> wrote in message
news:MP************************@news.microsoft.com ...
Joao Santa Barbara <jo****@i24potugal.com> wrote:
i try in one computer, and work fine, but in other computer it didnīt work
and throws this error ..???


Well, it looks like the user you're running it under doesn't have
permission to read that registry key - what happens if you try it with
just regedit?

Also, have a look at the .NET Configuration Wizard, and the permission
settings for Registry. (I don't know much about permission settings, so
you'll have to look in the help for how it all works.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Joao Santa Barbara | last post: by
4 posts views Thread by Leslie | last post: by
9 posts views Thread by Jerry C | last post: by
3 posts views Thread by =?Utf-8?B?bXNkblBNUg==?= | last post: by
7 posts views Thread by =?Utf-8?B?Sm9obi5ORVQ=?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.