-
.NET Registry Error
Hi,
I write a windows service. In that service I create a new subkey for registry. This service calls CreateSubKey() function. (in C#) When i run it, the program throw an exception to the event log said that
"Unauthorized error. Cannot write to the registry key". What can cause to this message??
(I logged in as an administrator)
Thanks
-
Is the service running under the Administrator account?
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
Registrty
Thank you Phil but
as I mentioned, I was running the service under the Administrator account.
Last edited by GabrielS; 06-25-2007 at 04:51 AM.
-
That's actually not what you said. ;-) You said you logged in as Administrator; the service does not necessarily run under the user account with which you logged in.
If the service is indeed running under the Administrator account, then I'm not sure what would cause the error. You might try using a tool like RegMon to see which registry key is causing the error.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Similar Threads
-
By Chris H Baker in forum C++
Replies: 5
Last Post: 01-17-2007, 01:37 PM
-
Replies: 5
Last Post: 12-19-2006, 06:07 AM
-
By Johnny Knoxville in forum VB Classic
Replies: 0
Last Post: 05-13-2002, 06:14 AM
-
By Martin in forum VB Classic
Replies: 22
Last Post: 12-03-2001, 03:53 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks