I have a website set up this way...
http://localhost <- project root.
http://localhost/Files <- vir dir (not application. just vir dir) with
write permissions.
1. Start VS.NET 2005 debugging. (must be vs.net 2005, not 2003)
2. Using code, System.IO.Directory.CreateDirectory a sub dir inside /
Files, something like, /Files/Images
3. Stop debugging.
4. Start debugging again, and do System.IO.Directory.Delete on the dir
you created. /Files/Images. No exception is thrown.
RESULT on my WIN XP Pro, IIS 5, .NET FWK 2.0:
The directory does not delete. it becomes inaccessible.
5. Now, stop debugging. still the dir is there but inaccessible.
6. Now, close VS.NET 2005. Now the directory is deleted as if it was
following the code step 4, delayed.
is this a known bug?
Michael Nemtsev, MVP - 29 Oct 2007 08:43 GMT
Hello mr t,
probably you started File bases project, not IIS one
In this case the ASP.net development server is started, which hosts your
app- you can see the icon into the notification area.
This app host your site, and doesn't unload when you stop debuggin. That's
why your site folder is not accessable to be deleted.
if your close the ASP.net development server from the notification area manually
- everything will be ok
---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
m> I have a website set up this way...
m>
m> http://localhost <- project root.
m> http://localhost/Files <- vir dir (not application. just vir dir)
m> with
m> write permissions.
m> 1. Start VS.NET 2005 debugging. (must be vs.net 2005, not 2003)
m> 2. Using code, System.IO.Directory.CreateDirectory a sub dir inside /
m> Files, something like, /Files/Images
m> 3. Stop debugging.
m> 4. Start debugging again, and do System.IO.Directory.Delete on the
m> dir
m> you created. /Files/Images. No exception is thrown.
m> RESULT on my WIN XP Pro, IIS 5, .NET FWK 2.0:
m>
m> The directory does not delete. it becomes inaccessible.
m>
m> 5. Now, stop debugging. still the dir is there but inaccessible.
m> 6. Now, close VS.NET 2005. Now the directory is deleted as if it was
m> following the code step 4, delayed.
m> is this a known bug?
m>
mr t - 29 Oct 2007 17:45 GMT
You know, I was opening as a "Web Site", instead of a "Project/
Solution". when I changed to solution, it seems to be working, at
least for now.
strange that it would not execute code commands when you run it the
other way.