Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

Create / remove directory

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SushiSean - 09 Oct 2007 17:45 GMT
Hello. I have problem with create and then remove directory on my site.
It works like this. My page
1) create directory
Directory.CreateDirectory(DirectoryPath);
2) put some files
3) Remove directory
Directory.Delete(DirectoryPath, true);

And I have problem here. For some strange reasons this directory because
read only and locked. I can't even open this until reopen my visial studio.
Why it happend? How I can create directory with full access and then remove
it with all files and subfolders inside?
Patrice - 09 Oct 2007 17:51 GMT
Only when using VS.NET ? Also if the file is server by ASP.NET it is lokced
by default for a short period of time. Soa ccessing the site from a web
client could prevent deleting it immedately after.

Not sure what you are doing with those directories/files but my personal
preference would be to avoid this or perhaps to serve them direcdtly from an
aspx page (in whihc case IIS won't lock them).

Also double check of course that you are properly closing those file...

--
Patrice

> Hello. I have problem with create and then remove directory on my site.
> It works like this. My page
[quoted text clipped - 10 lines]
> remove
> it with all files and subfolders inside?
SushiSean - 09 Oct 2007 18:58 GMT
Thanks, what about derectory security?
I mean in function Directory.Create(DirName, Security)
exist Security param. How set up this to make dir with full access?

> Only when using VS.NET ? Also if the file is server by ASP.NET it is lokced
> by default for a short period of time. Soa ccessing the site from a web
[quoted text clipped - 8 lines]
> --
> Patrice

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.