473,399 Members | 2,774 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,399 software developers and data experts.

how to access registry

Hi
I am developing web application through which i've to write and read the
values from the registry.
When i set impersonate property to "false" it is displaying exception "
Requested Registry Access is not allowed"
so then i changed impersonate to "true" and it is reading values from the
registry and writing into the registry.

but when i runing the same aplication in same system now am getting the
exception "requested registry access is not allowed" though i've set
impersonate property to "true"

Can anybody tell me how to solve this problem.
Its urgent for me.
Thanx in advance
Yoshitha
Jul 22 '05 #1
1 1126
There a number of possible causes for your problem:
1. Your logged on as a different user.
When you use impersonation, the aspnet process is running as the user
that was authenticated with the IIS. Since you are running on your own
machin, I presume you use Windows Authentication and the logged on user
is the user that runs the process.
If you are accidentally logged on as a different user with less
privileges and no permission to write to the registry you will see that
message.

2. Your own account permissions has changed.
For the same reason as 1, this can happen if your own account had
permissions to write to the registry but now it doesn't have.

3. Your authentication mode has changed.
If your IIS was set to Windows Authentication, but now it is set to
"Anonymous access", the IIS no longer run under the logged on account.
Instead it runs under the IWAM_<machine name> account which is used to
run the IIS process. As a result, the aspnet process will also run as
the IWAM_... account which is a low privileges account.

To solve your problem I would choose not to use impersonation.
I would instead try to give the ASPNET user (which runs the aspnet
process when you don't use impersonation) specific privileges to the
registry.
But I'm not a security expert, so you should check the implications
carefully before doing it this way.

Yanir

Jul 22 '05 #2

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

Similar topics

7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
21
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...
1
by: Yoshitha | last post by:
Hi I am developing web application through which i've to write and read the values from the registry. When i set impersonate property to "false" it is displaying exception " Requested Registry...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
1
by: david epsom dot com dot au | last post by:
http://msdn.microsoft.com/msdnmag/issues/05/04/RegFreeCOM/default.aspx Simplify App Deployment with ClickOnce and Registration-Free COM When you set app = createobject("Access.application.11")...
1
by: PiotrKolodziej | last post by:
Hi Here is the code: this.regPath = @"Software\FileManager\" ; System.Security.Permissions.RegistryPermission permissions = new...
1
by: UK1967 | last post by:
I wrote a ASP.NET application (Windows 2003 Enterprise Server, IIS, .NET Framework 1.1). This application use the Windows (AD) account and impersonation. Some functions in this application contact,...
37
by: Allen Browne | last post by:
If you develop for others, you probably have multiple versions of Access installed so you can edit and create MDEs for clients in different versions. This works fine under Windows XP, even with...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
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
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.