Web Forms and Environment.GetSpecialFolder

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

Guest

I am trying to get the path of a user's Personal folder from within a web form.
When I use the call:

Environment.GetFolderPath(Environment.SpecialFolder.Personal)

I get absolutely nothing back. When I query for Environment.UserName, it
returns ASPNET (which makes sense). The fact that the user is ASPNET and not
the real local user could explain why I'm not getting anything back with my
GetFolderPath calls.

Is there a way within a Web Form (I'm using vb.net as code behind) to
retrieve the Personal Path of the logged in user?
 
Personal path ?

Do you want to retrieve a server side or client side location ?

On a server a user doesn't have necessarily any specific personal path
(actually it may even have no profile). If your web application needs to
create directory to store some files for a particular user, I would create
explicitly the needed hierarchy as part of the web application data.

If you need the client side lcoation, what would you do with it (would be
more the work of some kind of applet that would do something significant
client side).

Patrice
 
Back
Top