System.io. in VS.NET 2005 debug

M

mr t

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?
 
M

Michael Nemtsev, MVP

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>
 
M

mr t

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top