473,797 Members | 3,199 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web Forms and Environment.Get SpecialFolder

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

Environment.Get FolderPath(Envi ronment.Special Folder.Personal )

I get absolutely nothing back. When I query for Environment.Use rName, 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?
Jul 21 '05 #1
1 3382
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

--

"Chandler Chao" <Chandler Ch**@discussion s.microsoft.com> a écrit dans le
message de news:18******** *************** ***********@mic rosoft.com...
I am trying to get the path of a user's Personal folder from within a web form. When I use the call:

Environment.Get FolderPath(Envi ronment.Special Folder.Personal )

I get absolutely nothing back. When I query for Environment.Use rName, 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?

Jul 21 '05 #2

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

Similar topics

0
2416
by: Sabine Oebbecke | last post by:
Hi Experts! I have several forms and reports where controls get their values with 'Forms!MainForm!Control' or 'Forms!MainForm!Subform!Control' resp 'Forms!MainForm!Subform.Form!Control' which works without any problem in Acc97, 2000 and 2002, but now in Access 2003 there seem to be a problem with this. A user is working with my app, and he uses an Access 2002 MDE in an Access 2003 environment.
19
4111
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate the code that implements managing unbound controls on forms given the superior performance of unbound controls in a client/server environment. I can easily understand a newbie using bound controls or someone with a tight deadline. I guess I need...
1
5071
by: Alasdair | last post by:
Friends, I'm an old C programmer who upgraded to C++ but was never comfortable with it. I've recently moved to C# and love it but I obviously am missing some of the subtleties. I thought the following code would simply expose the Form1 and move on but what actually happens is that the Form1 load hangs while the Worker1 thread goes to sleep. It's not the Thread.Sleep that's causing the load problem... any code here executes but the...
3
2289
by: Joshua Russell | last post by:
Hi, Both the methods below open up a windows form called MasterForm. However, one works better than the other. Method 1 opens the form correctly but I don't have any reference to the instance of master form. Method 2 opens the form but when I right click on the Notify Icon I don't get the context menu that I should be seeing. I can interact with the main form window but I cannot interact with the NotifyIcon. Method 2 gives a object reference...
2
284
by: Michael Tissington | last post by:
I'm having problems with Forms Authentication in a hosted environment. On our in house server and on my development machine everything works correctly However in a hosted environment, when clicking on a link to any exe file in my download\installs folder the login page is not displayed and the exe can be downloaded without authentication. Any ideas what could be different ?
8
2740
by: Stephen Rice | last post by:
Hi, I have a periodic problem which I am having a real time trying to sort. Background: An MDI VB app with a DB on SQL 2000. I have wrapped all the DB access into an object which spawns a thread to access the database and then displays a modal dialog which allows the user to cancel the task, if it is taking longer than they want, and shows them a display of how long the query has been running so far.
1
490
by: Chandler Chao | last post by:
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.
6
2288
by: Michael Tissington | last post by:
I have setup up Forms Authentication on my website and added configuration/mappings for exe, pdf and zip files (using C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll) However when ever I try to download a file I get the following error Can't Find Server or DNS error Any ideas please ?
11
1943
by: Monty | last post by:
Hello, I have a class library of business objects that will accessed both by an ASP.Net front end and a WinForms front-end. A typical business object in class library, let's say "Employee", has a save method. In the save method, after the employee record is successfully saved, a record is created in the history table to record who saved the object when. The user name, IP address (if it's web), and other information I would like to add to...
0
10469
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10246
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10209
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9066
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.