473,385 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 3439
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Zarko Jovanovic | last post by:
hi all, this is what happend: first I uninstalled office xp and the reinstall it after that my VB project (visual studio .net) cannot open references (project -> references) it says...
2
by: Joao Santa Barbara | last post by:
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...
4
by: coosa | last post by:
Hi, I was installing SQL Server on my machine and during installation my PC freezed. It happens frequently on my machine. So i tried after restarting to install it again and since then i always...
4
by: Leslie | last post by:
Using VS 2005 on Windows XP with SP2, I am attempting to write to the application log. I receive a dialog box that says: "Addiyional information: Ther source was not found, but some or all event...
9
by: Jerry C | last post by:
I am trying to write to the errorlog and I am getting the error Cannot open log for source 'Application'. You may not have write access. This is the code: Dim Logevent As New...
5
by: steve | last post by:
Hi All I have a VB.net 2005 App which uses MS Word 2003 to do printing and Mail Merging, by automation All works fine on my Laptop (XP Pro SP2, Word 2003) but on my desktop (XP Pro SP2, Word...
0
by: tmsprowl | last post by:
Greetings! I was wondering if someone could help me with a problem I'm having. My department is just one of many within my organization. My organization has control over the network domain,...
3
by: =?Utf-8?B?bXNkblBNUg==?= | last post by:
My .NET Windows Application is installed on over 350 computers. I am using ClickOnce to deploy/update the application. I have (1) one computer that the following error occurs when the application...
7
by: =?Utf-8?B?Sm9obi5ORVQ=?= | last post by:
Hi I have written a windows service in C# / .NET I have installed it and it's working fine on a couple boxes but on my XP box I get this error when I try to start it: Error 1053: The service did...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.