AppDomains

J

Jody L. Whitlock

Okay, I've banged my head against a wall for over a year now. Maybe
I'm just a rock when it comes to this.

I've got a new project, a Windows Service. The "application" itself is
in a DLL that is referenced by the exe. I did this for ease of
updating, just copy my new DLL(s) into an update directory and restart
the service when convienant. when the service EXE starts, it checks
for anything in my update dir, copies them over to the working dir,
then creates a new instance of the object inside my dll. This works
nicely, but I sat up last nite and wondered if I should explore loading
my DLL(s) into an appDomain of it's own, so when the service itself
finds a new DLL(s) in the update dir, it can just close the appDomain
the DLL(s) are in, then copy the junk over, and re-create the
appDomain. Nice and pretty.

There's one drawback, I have two event the DLL generates that my main
service captures and uses for varying reasons, so how to I proxy an
event across an appDomain???

I am friggin helpless in this matter for some odd reason.

JLW

--
 
C

Chris

about the update With .net you can just drop the new dll on top of the other
dll. That is how your update is done.

About the remote call take a look at RPC. You should have no problems doing
this over a proxy
 
J

Jody L. Whitlock

Chris said:
about the update With .net you can just drop the new dll on top of
the other dll. That is how your update is done.

About the remote call take a look at RPC. You should have no problems
doing this over a proxy

Thanks for the response Chris. It seems like RPC is used more for
WebServices, which is not what I'm interested in. It seems everytime I
look inot AppDomains and Remoting, i always end up at WebServices. So,
I guess I will not be using AppDomains and just not be able to use .NET
to it's fullest potential.
I've looked through the MSDN docs on AppDomains, and those are the
worst set of docs I've ever seen come from MS! they read like a
japanese person writing a korean car manual!
And yes, I can use the ShadowCopy method of an AppDomain, but I'm still
faced with dynamic unloading and reloading of the support libraries,
either way I'm stuck shutting down and restarting this service of 120
servers. So, I guess PSEXEC is going to be my best friend in this
since I can't seem to find a straightforward method of doing this.
I was also thinking of replacing my TCP Server that I built into this
service for remote admin functionality with Remoting, but everything I
find is very vague to say the least.

thanks,
JLW

--
 

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

Top