473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Q329290 getting ASP.NET userName

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
Nov 17 '05 #1
2 1544
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
"Mark" <po******@news.group> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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

Nov 17 '05 #2
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
"S. Justin Gengo" <sj*****@aboutfortunate.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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
"Mark" <po******@news.group> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dinçer | last post by:
Hi, I am trying to get user data (email data actually) from Active Directory. What I exactly want to do is, getting the email address according to username from the domain. For example, when I...
11
by: Derek Martin | last post by:
Using VB.Net, I would like to retrieve the currently logged in user's DN from Active Directory. Alternatively, if, using WindowsIdentity, or something similar, I would like to get the user's full...
0
by: ruju00 | last post by:
I am getting an error in Login() method of the following class FtpConnection public class FtpConnection { public class FtpException : Exception { public FtpException(string message) :...
13
by: Steve Enzer | last post by:
How can I get the login name of the user currently logged into Windows as a string? Thanks, Steve Enzer
2
by: PHP_Paul | last post by:
Ok, I'm trying to poineer into the wonderful area of PHP/MySQL programming, but I'm having some difficulties. http://www.paulhq.com/php/freepage.html should register, but when anyone fills something...
3
by: Michael | last post by:
Hi, I am getting a strange error. Last night when I left work this was working perfectly. This morning when I try to run this code in VS2005, it comes up with an error saying "The name 'UserName'...
4
nathj
by: nathj | last post by:
Hi, I'm working on a registration form and one of the checks I need to perform as the form is used is on the username. I need to ensure that it is not already in use. I am getting a little...
6
NawazAhmed
by: NawazAhmed | last post by:
Hi, I was trying to get local system's username in my code behind. I tried every almost possible way. Here is the scenario: My project is web based and I don't have a login screen....I need to get...
2
by: shapper | last post by:
Hello, I know that only authenticated users has a UserName. In Anonymous users there is an ID. If I am not wrong when getting a profile of a user, if the user is authenticated the UserName is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.