473,806 Members | 2,795 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 3385
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
2418
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
4117
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
5072
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
2294
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
2289
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
1945
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
9599
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10624
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
10371
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
10374
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
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5684
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
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
3853
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.