As described here, I'm writing a WinForms GUI that is run in an ASP.Net AppDomain.
However, whenever Web.config or the bin folder is modified, ASP.Net unloads the AppDomain, and the entire program dies.
Is there any way to prevent this?
2nd EDIT: In my EXE, I create the AppDomain by calling ApplicationHost.CreateApplicationHost
and pass it a type in my EXE that launches the GUI.
EDIT: I'm already aware that this is a horrible design.
Does anyone have a sane alternatives?
The program tracks accounts for a non-profit organization in a typed dataset.
It needs to send bills by email, and I'm using ASPX files to generate the emails. (I'd rather not change that, unless there's a very nice alternative; the templates have already been written)
The email templates are ASPX files that are deployed in a subfolder; that subfolder becomes the ASP.Net application and has the executable in its bin
directory for ASP.Net to load all of my code into its AppDomain.
The typed dataset must be accessed by both the UI and the ASPX files, and I don't want to download the data from SQL server twice