473,408 Members | 1,980 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,408 software developers and data experts.

Remote Debug security permissions for registry

tlhintoq
3,525 Expert 2GB
I pride myself on being able to Google just about anything but...

I have fought, tried, searched and fought some more on this one.

I am using VMware, and am able to debug from Visual Studio to the VMware virtual machine...

Right up until the application being debugged tries to write to the registry. Then it fails due to lack of security permissions.

It writes to the Host PC registry just fine. This is only happening when remote debugging to the VMware guest.

I just can't seem to find how/where I grant permission for remote debugging to write to the registry.

Firewalls on both host PC and VM guest are OFF.
I can use RegEdit on the host PC to do Remote Registry access (so I know Remote Registry Services are enabled) though only HKEY_LOCAL_MACHINE and HKEY_USERS is visible and I'd like HKEY_CURRENT_USER. But for now I can test in H_L_M if I can make it work

Can anyone help me out?

Error is "SecurityException was unhandled"
Request for the permission of type 'System.Security.Permissions.RegistryPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Jun 10 '09 #1
6 3651
tlhintoq
3,525 Expert 2GB
Well... 15 hours into the day (about the 8 day in the last couple months I've tried to make this work)... I finally got it going.

The VMware guest PC needs to have the .NET Framework 2.0 SDK version on it. It can't just have the redistributable as you would on a real client machine.
From there you can run the 2.0 configuration tool.
Then assign new policies.
The closest help I could find on the net was for "normal" remote debugging (one PC to another), not VS on the host OS with VMware being the remote PC.
Under normal remoting you can specifiy the address of the machine to allow FULL TRUST to. I could find no way to do it in VMware.

But.. If you just grant permission to " * " it will work. I know people will scream about security, but since the only machine that can talk to it, is the host operating system... I'm taking it as safe until something better comes along.

For a more graphical idea of what had to be done:

Jun 10 '09 #2
Plater
7,872 Expert 4TB
I think the config tool ONLY comes with the SDK? I know the config tools differ greatly between 1.1 and 2.0 (One was usefull, one was garbage, cannot remember which).
I'm not sure how to apply it in your case, but have you looked at the clickonce security settings on the project properties? That's what I ended up going with to deal with securityexceptions
Jun 11 '09 #3
tlhintoq
3,525 Expert 2GB
Nope. Never played with the "ClickOnce" features. I thought that was only for web deployment of an application. Am I wrong about that?
Jun 12 '09 #4
Plater
7,872 Expert 4TB
Depends on your thinking. Microsoft's is that "everything is web" now.

For example: I maintain a program that a number of people use at my company.
Instead of having a distributable, I keep it on a network share (UNC path) on a central server. Using ClickOnce with the setting of "application is only available online", it creates .application files. I make a shortcut to those .application files on the users desktops. When they run the shortcut, it makes sure they have the newest version and then opens the program.
All I need to do is publish to that UNC path and the ClickOnce overhead handles everything else.

It also makes a .<version#>.application file for every version i publish, so I can keep older revs, "just in case"
Jun 18 '09 #5
tlhintoq
3,525 Expert 2GB
Thanks for the info. Everything my company does is sold/installed on a per PC basis. Everything locally installed and protected with hardware dongle. So if the site buys 5 sales stations, that's what they get.

The previous code monkey never considered such a true client/server architecture with the server handling our own licensing scheme. But that is what I would like to move to when I have time to re-write those applications.

I'll have to look into the stuff you outlined. I guess the 5 machines in my house could make a good testing ground for it. Might be fun to surprise the boss with that. When you say...
I make a shortcut to those .application files on the users desktops. When they run the shortcut, it makes sure they have the newest version and then opens the program.
are you saying that the application is actually running across the network, hosted on the server? Sounds like a lot of network overhead.
Jun 19 '09 #6
Plater
7,872 Expert 4TB
@tlhintoq
Ehhh no not exactly, they sit in the Application Data folder in the user's directory.

The link on my desktop is to a UNC path (\\someServer\SomeShare\SomeProgram.applcation)
When its run (pretty sure its just an XML document), it checks to see what version it is, then looks to see if that version exists on my pc. It will automatically "update" my local copy (check that SomeShare\ directory for the correct version of the files and copy to my pc)
Then it runs the application.
If its the first time, you will get the "do you trust this software?" type prompt.

There is also .NET API (ApplicationDeployment namespace) that can check for updates while the software is RUNNING, and ask if they want to update, perform the update, and then restart.

Its great for our in-house applications, makes sure everyone is always using the correct version.
Jun 19 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ken Allen | last post by:
I folloowed the instructions on configuring the remote debugging capabilities, but I get the following error. I installed the remote debugging components from the .Net install CD on the remote...
3
by: Terry Olsen | last post by:
I have administrator access on 2 different domains on the network at my job. I wrote a program to query the registry key on remote PC's and return the results to an excel spreadsheet. However, the...
2
by: scorpion53061 | last post by:
hi all, I thought I would give this back and see if anyone could improve on it. I was working with the remote registry class. This code opens the ScreenSaverIsSecure registry setting and changes...
3
by: Nick | last post by:
Hello all, I've spent a lot of my time on this issue, and I thought it best to share my solution with the community. A special thanks to Willy Denoyette for his help. Ive opened about two...
0
by: sxzy | last post by:
Hi, I use OpenRemoteBaseKey to open HKLM key on remote machine in same domain Code fails on OpenSubKey with error "Requested registry key is not allowed" I tried to give permissions to...
5
by: Parv | last post by:
I am working in a domain environment. I am on a client machine and wants to edit registery of domain server. I am currently in a Domain user account and member of Domain administrators on the...
1
by: Jason Richmeier | last post by:
I am attempting to set permissions on a set of registry keys on a remote computer. I am able to open the registry key on the remote computer and read values from it. However, when I call the...
5
by: Sin Jeong-hun | last post by:
I need to read some registry keys of a remote computer. The key will be any key users provide. (For example : HKEY_CURRENT_USER\SOFTWARE \MyGame) I found that there was a handy method called...
3
by: JB | last post by:
I am trying to access a registry key on computer like so: key = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, computerName).OpenSubKey(Subkey); There are two keys I am trying to...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.