Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross AppDomain dynamic execution issues, need opinions please :)

Status
Not open for further replies.

bobbigmac

Programmer
Jun 2, 2005
8
0
0
GB
hey all, I need opinions on something Im trying to do with dynamically loading DLLs please :)

I have a bunch of dlls, compiled at runtime, and loaded in, then run.
My intention was to load each into seperate appDomains through a RemoteLoader marshalling class, then have them produce their output (non-serializable WebControls so no marshalling) and handle it in the main app.
The appDomains could then be unloaded, and the dll deleted.

the problem is that it seems I have a choice. I can
(a) return only serializable data types OR
(b) don't use appDomains and suffer the consequences of not being able to unload the DLLs from memory without restarting the asp.net worker process?

But I really don't want to face either situation, any ideas or suggestions please?
 
you couldn't delete the dll's because when the application is restarted you will need to load the objects again.

what are the benefits of this approach?

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
it's effectively to allow a form of scripting engine within the application. Users can write their own c#, which is then compiled at runtime, executed, then should be discarded so that it may be either replaced by a new version of the script or simply deleted.
 
this is a web-application with many users, so it's not like the application really get's restarted.
 
interesting idea. i have no idea where to even begin:)
this is a web-application with many users, so it's not like the application really get's restarted.
App pool restart
IIS reboot
server reboot
inactivity for a specific length of time
web.config changes
updates to the core assemblies

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top