Author |
Topic  |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
Posted - 31 October 2001 : 00:26:58
|
I peaked at the snitz code, and I noticed whenever an application variable gets defined or re-defined, Application.Lock and Application.Unlock are used. I also sorta copied the code in config.asp to re-define the variables if the admin changed something.
So, in admin_admin.asp for my new program, after updating the config table, I have:
Application.Lock Application("t-configloaded") = "no" Application.UnLock
And in the _top.asp file I have the following... configloaded = Application("t-configloaded") if configloaded = "no" or configloaded = "" or IsNull(Application("t-configloaded")) then strsql = "SELECT SHOWBANNERS, APPROVESITES, SITESTOSHOW, BANNER1, BANNER2, BANNER3, BANNER4, BANNER5, SITEBANNERSTOSHOW FROM ADMIN" set rs = t_conn.execute(strsql) Application.Lock Application("t-showbanners") = rs("SHOWBANNERS") Application("t_sitebanners") = rs("SITEBANNERSTOSHOW") Application("t-approvesites") = rs("APPROVESITES") Application("t-sitestoshow") = rs("SITESTOSHOW") Application("t-banner1") = rs("BANNER1") Application("t-banner2") = rs("BANNER2") Application("t-banner3") = rs("BANNER3") Application("t-banner4") = rs("BANNER4") Application("t-banner5") = rs("BANNER5") Application("t-configloaded") = "yes" configloaded = "yes" Application.UnLock set rs = nothing end if
Then below that I define variables using the application variables, all dimmed of course.
but I'm experiencing the following flaw, the application variables arent getting re-loaded after I change things, and I'm sure I set Application("t-configloaded") = "no" in the file that changes them. Yet when I reload the page (I have response.expires = 0 and response.addHeader "pragma","no-cache" in the _top.asp) it still dosnt reload the variables.
Any Ideas?
--------------- Da_Stimulator has spoken |
|
Kat
Advanced Member
    
United Kingdom
3065 Posts |
Posted - 31 October 2001 : 04:24:15
|
Have you tried stopping and restarting the service on IIS?
KatsKorner
|
 |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
Posted - 31 October 2001 : 04:47:56
|
I dont have access to that kinda stuff 
--------------- Da_Stimulator has spoken |
 |
|
Kat
Advanced Member
    
United Kingdom
3065 Posts |
Posted - 31 October 2001 : 06:42:42
|
Chances are that is what is causing it though. I don't know if there is a lot you can do short of talk to your host. Maybe someone else knows another way.
I do know that is what we have to do anytime we modify the application variables.
KatsKorner
|
 |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
Posted - 31 October 2001 : 06:50:57
|
How long of a wait before the application variables get cleared from the server memory? (by restricting access to the pages that call the variables...)
The server is readyhosting, as far as I know there is no way to stop/restart IIS
--------------- Need Snitz installed professionally?
|
 |
|
HuwR
Forum Admin
    
United Kingdom
20593 Posts |
Posted - 31 October 2001 : 06:51:30
|
you could try using this command Application.Contents.RemoveAll ()
But this does not work on all versions
|
 |
|
Da_Stimulator
DEV Team Forum Moderator
    
USA
3373 Posts |
Posted - 31 October 2001 : 06:57:41
|
hmm, I just thought of somthing. I'm not quite sure how app variables work, but I'm assuming they are just placed in the memory via there given name... So using Huwrs method would reset all the app variables on the server, including my forum (and other websites?) or just the app variables set for that virtual directory?
--------------- -Da_Stimulator
Edited by - da_stimulator on 31 October 2001 14:44:33 |
 |
|
Doug G
Support Moderator
    
USA
6493 Posts |
Posted - 31 October 2001 : 10:39:52
|
Application variables are shared by all of the web application.
If you make an explicit change to an application variable node, it should be immediately visible. If you need to clean out your application variables, use HuwR's code or restart the web.
====== Doug G ====== |
 |
|
|
Topic  |
|