aspnet_wp.exe restarts after updating assembly

G

Guest

I have a web app running on Windows 2000 with the home directory pointed to a
network share on a file server. We have a long running process which copies
jpg images from user's folders on a network share, processes them and copies
them to another location. Depending on the number of images this can take a
long time. If I update the dll (assembly) in the /bin folder the process dies
and the user is given a "Server Application Unavailable" page. When I look in
the event log all that is stated is that the aspnet_wp.exe stopped
unexpectedly.

I thought when a process was using an assmbly and the assembly was updated
the process continued to use the assembly (as a shadow copy) until it was
complete. Obviously, I'm mistaken.

I realize I should update during the obscure hours of the night, however
this is not the answer I am looking for because of other constraints. Is
there a fix? What are my options for a workaround? I realize I could do the
processing offline, but the clients want the files processed in realtime. Is
there a way I could trap the failure and recover from it when the worker
process restarts?

Thanks,
Mark
 
B

bruce barker

when you copy the dll, its causes asp.net to create a new appdomain for new
requests. its then drains the active requests in the old appdomain then
unloads it.

if you get a recycle its because either the new domain required too much
memory, or your long running process was seen as a deadlock.

you cannot catch the error because a recycle dumps all code an context. the
error the browser displays is because iis detaches the close pipe between it
and the asp.net worker process.

your options:

1) save copy context in a database / file and allow the user to continue
where they left off.
2) use an isapi filter written in c/c++ to do the copy.
3) best - write an ntservice (in .net) that does the copy, and have the copy
page request the service do the copy, then poll for completion.

-- bruce (sqlwork.com)

| I have a web app running on Windows 2000 with the home directory pointed
to a
| network share on a file server. We have a long running process which
copies
| jpg images from user's folders on a network share, processes them and
copies
| them to another location. Depending on the number of images this can take
a
| long time. If I update the dll (assembly) in the /bin folder the process
dies
| and the user is given a "Server Application Unavailable" page. When I look
in
| the event log all that is stated is that the aspnet_wp.exe stopped
| unexpectedly.
|
| I thought when a process was using an assmbly and the assembly was updated
| the process continued to use the assembly (as a shadow copy) until it was
| complete. Obviously, I'm mistaken.
|
| I realize I should update during the obscure hours of the night, however
| this is not the answer I am looking for because of other constraints. Is
| there a fix? What are my options for a workaround? I realize I could do
the
| processing offline, but the clients want the files processed in realtime.
Is
| there a way I could trap the failure and recover from it when the worker
| process restarts?
|
| Thanks,
| Mark
 
G

Guest

Thanks, Bruce.

I figured a service was my best bet although I hadn't thought about polling
the service. So I will be certainly using that. However, I ALSO need to allow
the user to resume in some cases. Could you give me a little more information
about the copy context you mentioned? How would I do that and where would I
find the documentation?

I appreciate your great response.

Thanks,
Mark
 

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,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top