Q329290 getting ASP.NET userName

M

Mark

In this article http://support.microsoft.com/?id=329290 I will have to
perform this in my installation. The question is since the
aspnet_setreg.exe does not automatically grant the asp.net service user name
to the registry entries how can I find the username the aps.net service is
running under so that I can programmatically grant this user access to the
registry keys created? You would think the aspnet_setreq.exe would finish
off the job by granting the asp.net service access to the registry keys.
Who else would the asp.net website run as that will have access to the
registry keys if you are actually using this tool?!? Or only if the tool
had a switch to allow it to automatically grant the current asp.net user
access to the registry keys if it does not have access.

So, just some insight on how to determine what the username of the asp.net
account is in C# :) I have a guess that if the <ProcessModel> attribute
userName="machine" it might be aspnet or networkuser on 2003 right?

-Mark
 
S

S. Justin Gengo

Mark,

Unless you changed it it will be running as ASPNET.

You can verify that this user exist by going to your Computer Management
window and opening the "Users" folder. You should see ASPNET in the list.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
M

Mark

Justin,

Thank you for your response to my question. The issue is I will not be the
one installing the sotware on customer systems and I refuse to have special
instructions to have the installer grant special rights in the registry.
This process should be automatic for out of the box installation solutions.
These days web applications are not just in house server farm solutions they
are sold like windows applications and installed by sometimes average users.

Basically the task of a user looking up the aspnet user manually, and
granting the access to the newly created registry keys to the aspnet user i
will have to perform this programmatically.

So far if the system is windows 2000 the user is apsnet if the <processModel
userName="machine"...> and if windows 2003 it will be networkuser i think..
will have to confirm this. But when installed on a domain controler i am
not sure what the user will be. On a system i have here it seems the user
is the anonymous web user. But now to determine how to use the
RegistryPermission class to grant these users access to the new registry
keys created.

-Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top