|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
remote registry access issue on Vista RC1better 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? -- 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 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.) Show quoteHide quote "Darren Mar-Elia (MVP)" <dmanonym***@discussions.microsoft.com> wrote in message news:eT2pJpc3GHA.4796@TK2MSFTNGP06.phx.gbl... >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? > > > > -- > 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 > > > 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 ? Show quoteHide quote "Darren Mar-Elia (MVP)" wrote: > 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? > > > > -- > 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 > > > >
Using remoting features inside a .NET applet loaded in a tag object
Configuration Tool missing Registry Permission Attributes .NET 2.0: SetAccessControl wipe out inherited ACEs deserialize and "medium trust" Runtime Security Policy Question EnvironmentPermission ASN1 unexpected end of data Events over remoting and security problem, related/not related, I don't know Windows Service Created Sub-process? |
|||||||||||||||||||||||