Re: Accessing registry fro ASP.NET web app

From: Dr. Strangedub (strangedub@netscape.net)
Date: 12/17/02


From: strangedub@netscape.net (Dr. Strangedub)
Date: Tue, 17 Dec 2002 00:44:33 GMT


Well, I got this working quite easily. I simply set the following in my
web.config file:
<authentication mode="Windows" />
<identity impersonate="true" />

And bang - seeing that I'm logged on to the network with a user-id that is in
the Administrators group on the web server - the registry update worked fine.

My real problem was that I originally used the first definition of the
OpenSubKey method -- which opens the key as read-only. Then I would get an
exception on the SetValue call.
Doh!

-Michael Rose
Unisys Corp.

On Mon, 16 Dec 2002 21:58:35 GMT, strangedub@netscape.net (Dr. Strangedub)
wrote:

>What do we need to set in web.config (I assume this is the place) in order to
>get our web app to access (read & write) the registry. In our present .asp
>environment, we rely on impersonation by IIS to grant the necessary privilege.
>Our prerequistites are:
>1. the ACL on the directory of the app must be set to Administrators group only
>2. IIS must have Windows authentication turned on
>3. and then we tell the admin to put specific user names in the Administrators
>group on the web server.
>
>Now with ASP.NET the web.config file has specific settings for impersonation,
>authorization and authentication. I've tried a number of combinations (plus
>I've done steps 1-3 above), but I can't seem to get the necessary registry
>access privilege. Would you know the answer - or where to look for
>documentation on this? Thanks in advance.
>
>-Michael Rose
>Unisys Corp.