Hello All!
Can you dynamicly create a folder in ASP.net? Here is the set up. I have a
folder where I will store pics. What I would like to do is create a cookie,
track the user who has logged on to the site. If user deside to upload
pictures under thier profile, a subfolder under the images folder will be
created with the folder name as the users name. I would like to keep the pics
seperatred for each user.
TIA!!
Rudy 5 1247
Hi Rudy,
Yes you can *if* you have the rights to do so. ASP.NET runs under a designated account (usually ASPNET on IIS5 or NETWORK SERVICE on IIS6) and this account will need rights to be able to create a directory in that folder where you need to create it. By default the accounts used do not have this permission, so you would likely have to add it.
To see what account your app is running under you can use:
Response.Write(Environment.Username);
to know which account needs the permissions in question.
+++ Rick ---
--
Rick Strahl
West Wind Technologies www.west-wind.com/weblog
"Rudy" <Ru**@discussions.microsoft.com> wrote in message news:0A**********************************@microsof t.com... Hello All! Can you dynamicly create a folder in ASP.net? Here is the set up. I have a folder where I will store pics. What I would like to do is create a cookie, track the user who has logged on to the site. If user deside to upload pictures under thier profile, a subfolder under the images folder will be created with the folder name as the users name. I would like to keep the pics seperatred for each user. TIA!! Rudy
Hi Rudy,
Yes you can *if* you have the rights to do so. ASP.NET runs under a designated account (usually ASPNET on IIS5 or NETWORK SERVICE on IIS6) and this account will need rights to be able to create a directory in that folder where you need to create it. By default the accounts used do not have this permission, so you would likely have to add it.
To see what account your app is running under you can use:
Response.Write(Environment.Username);
to know which account needs the permissions in question.
+++ Rick ---
--
Rick Strahl
West Wind Technologies www.west-wind.com/weblog
"Rudy" <Ru**@discussions.microsoft.com> wrote in message news:0A**********************************@microsof t.com... Hello All! Can you dynamicly create a folder in ASP.net? Here is the set up. I have a folder where I will store pics. What I would like to do is create a cookie, track the user who has logged on to the site. If user deside to upload pictures under thier profile, a subfolder under the images folder will be created with the folder name as the users name. I would like to keep the pics seperatred for each user. TIA!! Rudy
Hi,
In addition to what Rick mentioned about ASP file permissions, the
actual code to create a folder would be similar to:
System.IO.Directory.CreateDirectory(Server.MapPath ("images\\" +
Profile.UserName));
// Don't forget to check for IO errors ;)
Roger
On Sat, 23 Apr 2005 15:57:16 -0700 in
microsoft.public.dotnet.framework.aspnet, "Rudy"
<Ru**@discussions.microsoft.com> wrote: Hello All!
Can you dynamicly create a folder in ASP.net? Here is the set up. I have a folder where I will store pics. What I would like to do is create a cookie, track the user who has logged on to the site. If user deside to upload pictures under thier profile, a subfolder under the images folder will be created with the folder name as the users name. I would like to keep the pics seperatred for each user. TIA!!
Rudy
Hi,
In addition to what Rick mentioned about ASP file permissions, the
actual code to create a folder would be similar to:
System.IO.Directory.CreateDirectory(Server.MapPath ("images\\" +
Profile.UserName));
// Don't forget to check for IO errors ;)
Roger
On Sat, 23 Apr 2005 15:57:16 -0700 in
microsoft.public.dotnet.framework.aspnet, "Rudy"
<Ru**@discussions.microsoft.com> wrote: Hello All!
Can you dynamicly create a folder in ASP.net? Here is the set up. I have a folder where I will store pics. What I would like to do is create a cookie, track the user who has logged on to the site. If user deside to upload pictures under thier profile, a subfolder under the images folder will be created with the folder name as the users name. I would like to keep the pics seperatred for each user. TIA!!
Rudy
Thanks guys! Just what I needed.
Rudy
"Roger Helliwell" wrote: Hi,
In addition to what Rick mentioned about ASP file permissions, the actual code to create a folder would be similar to:
System.IO.Directory.CreateDirectory(Server.MapPath ("images\\" + Profile.UserName)); // Don't forget to check for IO errors ;)
Roger
On Sat, 23 Apr 2005 15:57:16 -0700 in microsoft.public.dotnet.framework.aspnet, "Rudy" <Ru**@discussions.microsoft.com> wrote:
Hello All!
Can you dynamicly create a folder in ASP.net? Here is the set up. I have a folder where I will store pics. What I would like to do is create a cookie, track the user who has logged on to the site. If user deside to upload pictures under thier profile, a subfolder under the images folder will be created with the folder name as the users name. I would like to keep the pics seperatred for each user. TIA!!
Rudy
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: David Webb |
last post by:
The problem started when the Working Folder for a project was somehow set to
the folder of another project. I set the correct working folder in VSS and
deleted the .vbproj files that had been...
|
by: I_AM_DON_AND_YOU? |
last post by:
There is one more problem I am facing but didn't get the solution. In my
Setup Program I am not been able to create 2 things (when the program is
intalled on the client machine ) : (1) create...
|
by: jzdeng |
last post by:
Hi, All
I use VS 2005 to create a web service. The web service is used to
create a sheared folder. It works fine we I run it from VS 2005. But,
when I move it to inetpub, it does not work...
|
by: Paw |
last post by:
Greetings.
I use asp.
what I need is is when a visitor comes to the site, I need it to check
the host name. if "www.hometowndigest.com" is the host, then check a
folder named "something" and if...
|
by: barb |
last post by:
So that the world at large benefits from our efforts, here is one fully
documented way to use Windows Irfanview freeware to create thumbnail web
galleries (http://www.irfanview.com).
STEP 1:...
|
by: 1333 |
last post by:
I need to create a new folder every time the upload folder has 10 files uploaded to it. So when folder1 has 10 files, folder2 is created and becomes the upload folder, and when it has 10 files...
|
by: Wiebe Tijsma |
last post by:
Hi,
I'm using C# + webDAV to create a draft message to be sent in a user's
Drafts folder.
I can create the message successfully, however when I open the message
in outlook, it doesn't show...
|
by: kai |
last post by:
Hi, All
I am trying to create a file folder for any login user, and create sub
folders for the user on a web page. After the user login again, he can only
sees his own folder on the Web page. I am...
|
by: Alan Mailer |
last post by:
Again, I'm new to VB.net and there is something I need help with:
Like (I assume) many of us, over time I want to be able to create some
VB.net classes that I might want to use in more than one...
|
by: krasman |
last post by:
hi everyone,
i hope you might help me on this one. i need to create a contact in a
exchange public folder using dotnet (vb or c#) and exchange 2003, without
using outlook object model. i'm...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
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...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
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...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
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...
| |