A
ASP.Confused
As you can tell from my previous posts on this issue...I'm really confused
:-/
I have a few ASP.NET web applications on my web host's "https" server. Our
web host has a single "bin" folder for me to toss my assemblies into. We
keep loosing session state every few months.
People have told me that my app could be running out of memory, causing the
sessions to get reset. Well, if this is the case, then when I go to the
page again, wouldn't a new session be created?
For example, I have a ASP.NET script with the following code:
----------------------------------------------------------------------------
--
<%@ Page Language="vb" EnableSessionState="true" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<%
' In theory, if the session variable does not exist, it will create one.
' If the session variable does exist, then it displays the value.
' If the form is submitted multiple times, the value within the session
' variable should be the same thorughout all the pages.
Randomize(Timer)
if Session("test_value") is Nothing then
Session("test_value") = CStr((65535 * Rnd()) + 1)
end if
if (Session("test_value") = "") or (Session("test_value") = "0") then
Session("test_value") = (65535 * Rnd()) + 1
end if
%>
Session("test_value") = <% =Session("test_value") %><br><INPUT id=Submit1
style="Z-INDEX: 101; LEFT: 40px; POSITION: absolute; TOP: 96px" type=submit
value=Submit name=Submit1>
</form>
</body>
</HTML>
----------------------------------------------------------------------------
--
When run on a standard IIS server, this works perfectly, and returns the
same number every time you hit "Submit." On my web host's server, when we
lose session states, it keeps returning a random number every time you hit
"Submit."
My web host usually has to restart the site to get sessions to come back,
but every 1 to 2 months, the errors come back again.
ANY help would be greatly appreciated. I've already tried removing all of
the .NET assemblies except for the ones vital to our site's operation, with
no success.
Sincerely,
ASP.Confused
:-/
I have a few ASP.NET web applications on my web host's "https" server. Our
web host has a single "bin" folder for me to toss my assemblies into. We
keep loosing session state every few months.
People have told me that my app could be running out of memory, causing the
sessions to get reset. Well, if this is the case, then when I go to the
page again, wouldn't a new session be created?
For example, I have a ASP.NET script with the following code:
----------------------------------------------------------------------------
--
<%@ Page Language="vb" EnableSessionState="true" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<%
' In theory, if the session variable does not exist, it will create one.
' If the session variable does exist, then it displays the value.
' If the form is submitted multiple times, the value within the session
' variable should be the same thorughout all the pages.
Randomize(Timer)
if Session("test_value") is Nothing then
Session("test_value") = CStr((65535 * Rnd()) + 1)
end if
if (Session("test_value") = "") or (Session("test_value") = "0") then
Session("test_value") = (65535 * Rnd()) + 1
end if
%>
Session("test_value") = <% =Session("test_value") %><br><INPUT id=Submit1
style="Z-INDEX: 101; LEFT: 40px; POSITION: absolute; TOP: 96px" type=submit
value=Submit name=Submit1>
</form>
</body>
</HTML>
----------------------------------------------------------------------------
--
When run on a standard IIS server, this works perfectly, and returns the
same number every time you hit "Submit." On my web host's server, when we
lose session states, it keeps returning a random number every time you hit
"Submit."
My web host usually has to restart the site to get sessions to come back,
but every 1 to 2 months, the errors come back again.
ANY help would be greatly appreciated. I've already tried removing all of
the .NET assemblies except for the ones vital to our site's operation, with
no success.
Sincerely,
ASP.Confused