If your Application variables are "evaporating" occasionally,
you can reset them, and make sure they do exist, by using an include file:
Include this "test_app_vars.inc" in your pages :
<% language="vbscript" RUNAT=SERVER %>
<%
If Application("str1") = "" Then
'this runs f the variables have been lost
Application.Lock 'Lock App while you reset
Application("str1") = "whatever that variable is"
Application("str2") = "whatever"
Application("str3") = "something else"
Application.Unlock
End If
%>
That will assure you that even if the variables are "lost", by anything your
provider has misconfigured, your variables will be available for your use
in any page in which you include "test_app_vars.inc".
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
"Giorgio" <da*@sa.it> wrote in message news:pI*******************@news3.tin.it...
Hi all,
i have a problem with a website where i use asp 3 and a global.asa in the
root.
In global.asa i use some aaplication variables which contains strings, such
as: Application("str1")="text".
Sometimes (even if i dont change the code) application variables becomes
null
To solve the problem i delete from server my global.asa and upload new one
(with same code inside)
Provider says their servers are all right
how can i fix it?
Thanx