Restart ASP.NET on Error?

X

xenophon

I have created an external AppDomain for use in my ASP.NET 1.1 app, it
is shared by all web users (it will eventually be physically Remoted
hosted on another server). When there is an Exception, the AppDomain
does not always unload. In fact, I can delete every file from the
directory tree except for the seperate DLL that has the AppDomain code
in it.

Short of using the IIS manager to stop the site (I do not have
Administrator permissions), how else can I handle this problem?

Thanks.
 
B

Brock Allen

What do you mean exactly that when an Exception is thrown? You mean across
the AppDomain boundary? That's perfectly fine, as an Exception is a perfectly
valid return value (if you will) from a method call, just as a normal return
value or output parameters are. So since it's a normal return value then
should have no bearing upon the lifetime of your child AppDomain.
 
S

Steven Cheng[MSFT]

Thanks for Brock's suggestions.

Hi Xenophon,

I'm still not quite sure on the "external appdomain" you mentioned, is it a
separate appDomain where a certain executable assmebly(exe) is executing
or just a helper appdomain(as those add-in like appdomain)? As Brock has
mentioned, if you're doing cross-domain bound method calling , an unhandled
exception occured in the subdomain can be correctly handled in the parent
domain and the subdomain won't be unloaded. As for unhandled exceptions,
only when they're occuring in the main thread or an Unmanaged thread in the
appdomain will it cause the Process(not appdomain) to unload.

Please feel free to post here if you have some further nformation or
questions on this issue.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top