So after much playing around i've got .NET setup and doing a lot of our processing.
The classes are registered as global variable, but i've found doing them locally on a accesible page creates unrecoverable overhead. They are persistant classes, thus needed for functions throughout regular use of the website. So I create once (on startup - see code below), and use many times - and it works perfectly.. apart from one problem, that i'm not sure is able to be fixed. But i'll ask anyway.
Regardless of how they (classes, namespace, dll file itself) are registered and disposed of, i cannot make changes to the .NET assembly (IconLib2.dll) without shutting down the server.
ASP.NET had "shadow copy" which allowed for changes to an assembly without restarting the server. It was able to finish currently running processes on classes in a copy of the dll, and allowed new execution on the new version. Maybe i can do some
I guess i'm looking for a similar solution to that in Alpha or some way to Kill the lock it places on the dll?
Its not something that is completely necessary (hopefully all code if tested before live - but always hard to tell what crazy stuff our users will throw at us). but would be very ideal to do.
The reason for this is more so to revert fast to a previous version of the dll, this is if a change has been made in the dll that breaks things for a user, where reverting the old version would suffice - or doing a quick fix to the code and replacing with a new version. And to do so without interrupting all our users with a server restart would be ideal.
Heres the code follows in the Autoexec code file for alpha five:
(the ui_msg_box calls just let me know that the classes are successfully registered on startup of Alpha Five, if one returns NARP then i know i've got a problem with or in the assembly)
The classes are registered as global variable, but i've found doing them locally on a accesible page creates unrecoverable overhead. They are persistant classes, thus needed for functions throughout regular use of the website. So I create once (on startup - see code below), and use many times - and it works perfectly.. apart from one problem, that i'm not sure is able to be fixed. But i'll ask anyway.
Regardless of how they (classes, namespace, dll file itself) are registered and disposed of, i cannot make changes to the .NET assembly (IconLib2.dll) without shutting down the server.
ASP.NET had "shadow copy" which allowed for changes to an assembly without restarting the server. It was able to finish currently running processes on classes in a copy of the dll, and allowed new execution on the new version. Maybe i can do some
I guess i'm looking for a similar solution to that in Alpha or some way to Kill the lock it places on the dll?
Its not something that is completely necessary (hopefully all code if tested before live - but always hard to tell what crazy stuff our users will throw at us). but would be very ideal to do.
The reason for this is more so to revert fast to a previous version of the dll, this is if a change has been made in the dll that breaks things for a user, where reverting the old version would suffice - or doing a quick fix to the code and replacing with a new version. And to do so without interrupting all our users with a server restart would be ideal.
Heres the code follows in the Autoexec code file for alpha five:
(the ui_msg_box calls just let me know that the classes are successfully registered on startup of Alpha Five, if one returns NARP then i know i've got a problem with or in the assembly)
Code:
dim sv as DotNet::Services dim Alpha5Net4 as DotNet::AssemblyReference Alpha5Net4.FileName = "C:\temp\params\IconLib2.dll" if .not. file.exists(Alpha5Net4.FileName) msg_txt = Alpha5Net4.FileName + " missing, stuff will not work!!!" ui_msg_box("Registration Failed",msg_txt) else ui_msg_box("Registration Success","YARP") end if if sv.RegisterClass("IconLib2","HeaderFunctions","IconLib2.HeaderFunctions",Alpha5Net4) ui_msg_box("Registered HeaderFunctions","YARP") else ui_msg_box("HeaderFunctions not found :(","NARP") end If if sv.RegisterClass("IconLib2","GenericFunctions","IconLib2.GenericFunctions",Alpha5Net4) ui_msg_box("Registered GenericFunctions","YARP") else ui_msg_box("GenericFunctions not found :(","NARP") end If if sv.RegisterClass("IconLib2","ProcessWebsiteXMLImages","IconLib2.ProcessWebsiteXMLImages",Alpha5Net4) ui_msg_box("Registered ProcessWebsiteXMLImages","YARP") else ui_msg_box("ProcessWebsiteXMLImages not found :(","NARP") end If dim GLOBAL HeaderFunctions as IconLib2::HeaderFunctions dim GLOBAL GenericFunctions as IconLib2::GenericFunctions dim GLOBAL ProcessWebsiteXMLImages as IconLib2::ProcessWebsiteXMLImages