473,326 Members | 2,134 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,326 software developers and data experts.

problem with client-side details using ExpandEnvironmentVariables

Hi,

I'm creating an ASP.NET Web Application in vs 2005 (VB) and need to get the
location of the users User profile. The code below works...
Environment.ExpandEnvironmentVariables("%UserProfi le%"))

...But when you upload the website onto the server it retrieves the servers
user profile location and not the users.

Is there anyway to retrieve the user profile of a given user?

Thanks for you help and time

Jul 16 '07 #1
2 1787
On Jul 16, 4:38 pm, Damien <D...@community.nospamwrote:
Hi,

I'm creating an ASP.NET Web Application in vs 2005 (VB) and need to get the
location of the users User profile. The code below works...
Environment.ExpandEnvironmentVariables("%UserProfi le%"))

..But when you upload the website onto the server it retrieves the servers
user profile location and not the users.

Is there anyway to retrieve the user profile of a given user?

Thanks for you help and time
hi,
Its seems your not clear about how web application work...your server
side code never executed in client side.
do not think like desktop programming ,,,
change your mind to web domain...

thanks
nahid

Jul 16 '07 #2
Thanks for you response.

When working with asp coding you are able to retrieve the user profile of
the person who is using the web app:

Set objShell = CreateObject("wscript.Shell")
UserProfile = objShell.ExpandEnvironmentStrings("%UserProfile%")

Doing this in vs brings the server details back. Is there an alternative
way of making it get the users details?

An example where this happens elsewhere is:
In asp - request.servervariables("LOGON_USER") retrieves the users username.
In vs 2005 this same code retrieves the server's username. What I had to
use instead was My.User.Name

Thanks

Damien
"nahid" wrote:
On Jul 16, 4:38 pm, Damien <D...@community.nospamwrote:
Hi,

I'm creating an ASP.NET Web Application in vs 2005 (VB) and need to get the
location of the users User profile. The code below works...
Environment.ExpandEnvironmentVariables("%UserProfi le%"))

..But when you upload the website onto the server it retrieves the servers
user profile location and not the users.

Is there anyway to retrieve the user profile of a given user?

Thanks for you help and time

hi,
Its seems your not clear about how web application work...your server
side code never executed in client side.
do not think like desktop programming ,,,
change your mind to web domain...

thanks
nahid

Jul 16 '07 #3

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

Similar topics

21
by: BlackHawke | last post by:
My name is Nick Soutter, I own a small game development company (www.aepoxgames.net) making our first game (www.andromedaonline.net) in java. I am writing because we are having a very...
9
by: John Lull | last post by:
I'm writing a multithreaded COM server to manage a pool of hardware resources. All objects are designed to be thread-safe, and I've set sys.coinit_flags to COINIT_MULTITHREADED before importing...
1
by: jean.rossier | last post by:
Hello All, I am facing a problem while importing pylab library(in a .py program file) via web browser however the same program works when I execute it from the command prompt. my...
0
by: Ren, Ziheng | last post by:
Hi, i have already found a xindice based java gui. but it appears always a big problem from the xupdate functions. If i tip some commands in and try to execute them, it will appear an exception,...
20
by: Steevo | last post by:
For some reason I can't seem to get the contact form on our website to work any longer. I think I must have something wrong in the script because I keep getting an "Internal Server Error" upon...
10
by: Saso Zagoranski | last post by:
hi, this is not actually a C# problem but since this is the only newsgroup I follow I decided to post my question here (please tell me where to post this next time if you think this post...
0
by: Harley | last post by:
Hello, I am just learning the tcp/ip functions etc under vb.net so please look over me if this is obviouse. I have been all over looking into any functions that I didn't totaly understand and...
0
by: Ben | last post by:
I modified the logmonitor sdk example so it would work over a network. It works great when the client and server are running on the same PC and have administrator privileges. So I have two...
1
by: Steve K. | last post by:
I'm working on my first remoting project. It's going well and I have one (that I know of!) bug left to work out. I understand how remote objects have leases and those leases expire. I fixed a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.