473,396 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

aspnet_wp.exe has handle on directory being deleted

I have a basic aspx page for the user to select the month & year. They then
click a button to generate a report. The following sequence happens:

- Temp directory is created (if it exists already, it is deleted first)
- A simple aspx file is built in code and written to the temp directory with
a StreamWriter
- A View Report button is displayed for the user
The View Report button is a HyperLink control that targets a blank window.
When clicked the temp aspx file in the temp directory is displayed in the
window.

Once the temp aspx file is accessed, if the user tries to run the report
again, an error is thrown. It appears that aspnet_wp.exe has a handle on the
temp directory which interferes with the following code:

If Directory.Exists(strPath) = True Then
Directory.Delete(strPath, True)
End If
Directory.CreateDirectory(strPath)
....
dsDataSet.WriteXml(strPath & "\report.xml")
....
objStreamWriter.Write(strHtml)
The error only occurs the first time the report is run after viewing the
file. The error is caused by the WriteXml command not having a directory to
write to. So the directory gets deleted but it does not get recreated.
Re-running the report again at that poit is successfull.

Here's a summary of how to recreate the error:

Run report = success
Don't view file
Re-run report = success
View file
Re-run report = failure
Re-run report = success

This appears to be an issue where aspnet_wp.exe has a handle on a
file/directory that is part of the web application. Is there a way to keep
hat from happening?
Sep 25 '08 #1
0 819

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Akoni | last post by:
Hello, I have written a ASP.NET (C#) front-end that connects to an unmanaged win32 c++ dll. A few problems occur: -I am unable to use the IO stream (write to an event log) from the dll....
3
by: Ingo Lundberg | last post by:
So, I have a brand new PC with XP Professional SP2 and .Net 1.1 SP1 (no .Net 1.0). I also have VS.Net 2003. I create a new directory with Explorer and web share it. I create a new ASP.Net web...
4
by: Everett Muniz | last post by:
System: Windows 2000 SP4 ..NET Frameworks Installed: 1.0, 1.1 SP1 ..NET Framework In Question: 1.1 SP1 Web Server: IIS 5 Process Model User: machine Development Environment: VS.NET 2003...
0
by: bpssolutions | last post by:
hi- i'm going mad over here. any help would be greatly appreciated. aspnet_wp.exe hangs whenever i browse to the virtual directory in which i am developing, sucking up all CPU time. any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.