473,507 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NET Control & registry access permissions

Hi,

I will appreciate any insights to set the right permissions to a Windows
Forms Control that is embedded in an html document. The control will be
downloaded by the html doc to the local system to do its job. It requires
file system and registry access rights (read/write).

One of the problems is that restricted users will open the html document
(using IE) and the control needs to have enough rights to access the file
system and registry as mentioned above.

I have done the following:
1) Signed the control.
2) Created a NET policy to grant the respective rights to the control using
NET configuration snap-in.
3) Trusted the control (using strong name) with the enterprise level security.

Attempted granting read access to a subkey as below but failed. The specific
code lines are:
//new RegistryPermission(RegistryPermissionAccess.Read, subKey).Assert();

RegistryPermission f = new RegistryPermission(
RegistryPermissionAccess.Read, subKey);

f.AddPathList(RegistryPermissionAccess.Read, subKey);
RegistryKey sk1 = rk.OpenSubKey(subKey);

I get an SecurityException at above line.

The file system security settings are given using:
// Set unrestricted permissions to access the filesystem
new FileIOPermission(PermissionState.Unrestricted).Ass ert();

Questions:
What is the best way to do it?
Should I impersonate the access with elevated rights? How?
Can I avoid creating a msi package to have the administrator installing the
control locally, before using it?

Thank you,

Carlos
Mar 26 '06 #1
0 1490

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8271
by: lobrys | last post by:
hi I build a VB .NET application that makes file access, environnemet acess, database access, etc.... If I ran the app locally, everything works....(normal) If I copy the app on a server, and...
3
5767
by: Scott Emick | last post by:
In my visual studio (enterprise arch. 2003) when I try to open my projects, or add to a project a component (vb windows project) I get a big red X inside a red frame and the error pops up: The...
3
1919
by: Mike Malter | last post by:
On my XP Professional dev machine, I am able to read the registry by giving permissions to the ASP.NET account on the local machine. When I transfer the code to my staging server (Windows 2003),...
3
2192
by: Fred R | last post by:
I'm designing an app in Access 97 that will facilitate the uploading of records and images to a website. The user selects the image thumbnails from the file system and drags them into the app....
21
10759
by: Kevin Swanson | last post by:
I'm attempting some remote registry manipulation via C#. I've written a test app to simply grab a specified key from a specified hive on a specified machine. The call to OpenSubKey is throwing...
4
9075
by: Kevin L | last post by:
I store some application settings in the registry under HKEY_LOCAL_MACHINE\Software\MyApplication I want to allow full access to this key and subkeys. Currently, I manually change the...
1
6529
by: PiotrKolodziej | last post by:
Hi Here is the code: this.regPath = @"Software\FileManager\" ; System.Security.Permissions.RegistryPermission permissions = new...
3
8307
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
1213
by: LorenVS | last post by:
Hello Everybody, I'm new here, and I'm hoping someone can help me out... I'm creating an ActiveX control for an company intranet. This control needs to access Microsoft Outlook (specifically...
0
7223
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
7110
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
7372
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...
1
7030
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
7482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
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,...
1
5041
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...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.