which reg key to use?

  • Thread starter Thread starter Marty McDonald
  • Start date Start date
M

Marty McDonald

I'm trying to manually edit the resistry so Asp.Net can write to the app
log. If my web app is named "TestApp", wouldn't I just create a key called
"TestApp" under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application?
Nothing seems to work!
 
Could you explain further what you're trying to do? From what I know, in
order for ASP.NET to be able to read a key in the registry it has to be
granted permission using regedt32.exe. An administrator needs to do this.

On XP and W2k3 using regedit you simply right click on the key and choose
the permissions option.
 
Hi Marty,


Thank you for using Microsoft Newsgroup Service. From your description,
you've met some problem when trying to
manually add a key under
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application"
and then write eventlog in ASP.NET application. Please correct me if my
understanding of your problem is not quite accurate.

Based on my experience, try such reg key operation in ASP.NET will occur
some security errors. Just as Shiv Kumar's suggestion, the ASP.NET
application normally runs under the MACHINE\ASPNET account which may hasn't
the appropriate privilige for operating the reg key.
Also, as for the problem in this issue, would you provide some more
information on what errors you met. Is the something like "Requested
Registry Access Is Not Allowed" error when wrote evenlog in ASP.NET?

And here is a knowlege base article on:
#"Requested Registry Access Is Not Allowed" Error Message When ASP.NET
Application Tries to Write New EventSource in the EventLog

http://support.microsoft.com/?id=329291

You may have a check to see whether it helps. Meanwhile, if you have any
other questions on it, please feel free to post here.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
I'm trying to utilize the Microsoft Exception Management Application Block
in ASP.Net. The ExceptionManager is trying to write to the registry, and I
received the message "System.Security.SecurityException: Requested registry
access is not allowed."

I have followed the recommendations (first & second approaches) at
http://support.microsoft.com/?id=329291. I've also followed the
instructions included with the EMAB, using the ExceptionManagerInstaller
class.

Perhaps the registry key is fine now, and it's just a security issue. So I
should investigate that now. Thanks for the help!
 
Hi Marty,

Thanks for your response. From your description, you actually want to write
the reg key in ASP.NET application. I do think it likely to cause security
issue. So you may try Shiv Kumar's suggestion, adjust the certain reg key's
permission options via the regdet32.exe tool.

If you meet any other problem or need any help, please feel free to post
here.


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Back
Top