problem with client-side details using ExpandEnvironmentVariables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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("%UserProfile%"))

...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,

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("%UserProfile%"))

..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
 
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
 
Back
Top