Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / September 2006

Tip: Looking for answers? Try searching our database.

remote registry access issue on Vista RC1

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Darren Mar-Elia (MVP) - 21 Sep 2006 23:07 GMT
I asked this in the Vista dev support newsgroup but thought I might have
better luck here:

I've got a .Net 2.0 WinForms app that I've written for XP/2003. One of
things it does is use the OpenRemoteBaseKey on the RegistryKey class to
acces the registry of a remote machine. This works fine on XP/2003. However,
when I hit a Vista RC1 box with it, it fails with "Attempted to perform an
unauthorized operation."

I've tried attributing the assembly as a whole with the following:

[assembly: RegistryPermissionAttribute(SecurityAction.RequestMinimum, Read =
@"HKEY_LOCAL_MACHINE")]

But it did not seem to help. I suspect I'm missing something or is this a
new Vista security thing? Either way, work arounds?

Signature

Darren Mar-Elia
MS-MVP-Windows Server--Group Policy
http://www.gpoguy.com -- The Windows Group Policy Information Hub:
FAQs, Training Videos, Whitepapers and Utilities for all things Group
Policy-related
Group Policy Management solutions at http://www.sdmsoftware.com

Nicole Calinoiu - 23 Sep 2006 14:54 GMT
This sounds like a user permissions issue, not a CAS permissions issue, so
increasing your assembly's CAS permissions is unlikely to be of any help.
Are you sure your user account has sufficient permissions for accessing the
registry remotely on the Vista machine?  What happens if you attempt to
connect via regedit?

BTW, adding an assembly-level RequestMinimum for a CAS permission doesn't
cause your assembly to be granted any additional permissions under normal
circumstances.  It just results in your assembly failing to load if it isn't
granted the requested permission.  If your assembly loads after you add a
RequestMinimum, it already had the permission(s) you requested.  (The only
exception to this is if you're also using RequestOptional attributes, which
may have resulted in the implicit rejection of the permission you need.)

>I asked this in the Vista dev support newsgroup but thought I might have
>better luck here:
[quoted text clipped - 14 lines]
> But it did not seem to help. I suspect I'm missing something or is this a
> new Vista security thing? Either way, work arounds?
serge calderara - 28 Sep 2006 08:39 GMT
Hi,

I have read som article on Vista security stuff and they have drastically
improve system security by giving by default the least priviledge. If you try
to run an action whcih require administration level you will get a nice popup
windows that will informed you that you do nt have the rights to execute such
oiperation and in certain situation you will be able to enter the admin
credential.

That behaviour will affect most all application which was previoulsy runing
with high priviledge.

When you run your applciation under XP or 2000, with which user login were
you executing your applciation ?

> I asked this in the Vista dev support newsgroup but thought I might have
> better luck here:
[quoted text clipped - 12 lines]
> But it did not seem to help. I suspect I'm missing something or is this a
> new Vista security thing? Either way, work arounds?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.