Monday, March 26, 2012

Setting registry permission after aspnet_setreg.

I am using aspnet_setreg but the permissions that it sets the registry to
leave the application unable to access the information. I want to add the
ASPNET account on the machine that our application is being installed on
with read privilege automatically. Does anyone know of a way to easily set
registry permissions? I would prefer to use .NET (C#) but I can always wrap
any code that does this. I am suspecting that this will involve C++ or
managed C++ as the registry classes within the .NET framework do not seem to
have properties to set permissions. It would be nice if aspnet_setreg had
the ability to set the permissions rather than defaulting to some that in my
case are unusable.

Thank you for your suggestions.

Kevin BurtonKevin Burton wrote:

> I am using aspnet_setreg but the permissions that it sets the registry to
> leave the application unable to access the information. I want to add the
> ASPNET account on the machine that our application is being installed on
> with read privilege automatically. Does anyone know of a way to easily set
> registry permissions? I would prefer to use .NET (C#) but I can always wrap
> any code that does this. I am suspecting that this will involve C++ or
> managed C++ as the registry classes within the .NET framework do not seem to
> have properties to set permissions. It would be nice if aspnet_setreg had
> the ability to set the permissions rather than defaulting to some that in my
> case are unusable.
> Thank you for your suggestions.
> Kevin Burton

I usually use the regedt32 command. You can set permissions in that
interface....

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

0 comments:

Post a Comment