Ask a Question related to ASP, Design and Development.
-
Ron Vecchi #1
Asp Session state ??
I'm pretty new to asp.
It seems that I am assigning to the session rather than comparing against.
I want to compare it in the first peice of code but it seems that I am
assigning to it. When the user first requests the page they are not a
member.
Heres my code:
If(Session("IsMember") = "True") then
'Do Nothing
End if
'should still not be True
If(Session("IsMember") = "True") then
Response.write("IS TRUE")
End If
'Response.write is working telling me that the first part of the code
assigned to the session
'Am I doing something wrong??
Ron Vecchi Guest
-
Session state IIS (Machine Key | Load Balanced Session)
This is a classic ASP group. Try microsoft.public.dotnet.framework.aspnet "Fred" <me@me.com> wrote in message... -
Session State
Hi, I understand that there are 3 modes in which I can configure the SessionStateModule. What I need is an out of process Session State store... -
session state ???
Hi, I have following function in a WebService-class : public int Count() { if ( null == Session ) Session = 0; else -
Using a SQL DB for session state.
I have encountered a problem when I restart a SQL server I lose my session variables for ASP.NET It seems that the Temp table cannot be used... -
Session state...
Why are you calling a webservice that is within the same app. Shouldn't the web service be on a different server or at least be a different IIS... -
Egbert Nierop \(MVP for IIS\) #2
Re: Asp Session state ??
"Ron Vecchi" <vencenzo@comcast.net> wrote in message
news:e6Ia3LhSDHA.2276@TK2MSFTNGP10.phx.gbl...Try this:> I'm pretty new to asp.
>
> It seems that I am assigning to the session rather than comparing against.
> I want to compare it in the first peice of code but it seems that I am
> assigning to it. When the user first requests the page they are not a
> member.
Dim isMember
isMember = Session("IsMember")
If isMember = True then
Else
End If
b.t.w. Your code should work normally. Maybe the issue is with "True"
(String) instead of True (boolean)>
> Heres my code:
>
>
> If(Session("IsMember") = "True") then
> 'Do Nothing
> End if
>
> 'should still not be True
>
> If(Session("IsMember") = "True") then
> Response.write("IS TRUE")
> End If
>
> 'Response.write is working telling me that the first part of the code
> assigned to the session
> 'Am I doing something wrong??
>
>
>
>
>Egbert Nierop \(MVP for IIS\) Guest
-
UR ednec #3
Re: Asp Session state ??
Insert these lines at the top of your ASP page:
<%
Response.Write("Session Variable Value: " & Session("IsMember"))
%>
If you dont see anything next to the above sentence then your assumption is
correct. If not, your assumption is wrong and you are setting the session
variable somewhere.
HTH
"Ron Vecchi" <vencenzo@comcast.net> wrote in message
news:e6Ia3LhSDHA.2276@TK2MSFTNGP10.phx.gbl...> I'm pretty new to asp.
>
> It seems that I am assigning to the session rather than comparing against.
> I want to compare it in the first peice of code but it seems that I am
> assigning to it. When the user first requests the page they are not a
> member.
>
>
> Heres my code:
>
>
> If(Session("IsMember") = "True") then
> 'Do Nothing
> End if
>
> 'should still not be True
>
> If(Session("IsMember") = "True") then
> Response.write("IS TRUE")
> End If
>
> 'Response.write is working telling me that the first part of the code
> assigned to the session
> 'Am I doing something wrong??
>
>
>
>
>
UR ednec Guest
-
Evertjan. #4
Re: Asp Session state ??
Ron Vecchi wrote on 14 jul 2003 in
microsoft.public.inetserver.asp.general:
You are using serverside asp vbscript using far to much brackets and> I'm pretty new to asp.
>
> It seems that I am assigning to the session rather than comparing
> against. I want to compare it in the first peice of code but it seems
> that I am assigning to it. When the user first requests the page they
> are not a member.
>
>
> Heres my code:
>
>
> If(Session("IsMember") = "True") then
> 'Do Nothing
> End if
>
> 'should still not be True
>
> If(Session("IsMember") = "True") then
> Response.write("IS TRUE")
> End If
>
> 'Response.write is working telling me that the first part of the code
> assigned to the session
> 'Am I doing something wrong??
using true as a string, not as a boolean.
Try:
=== /file1.asp:
<%
Session("IsMember") = True
%>
=== /file2.asp:
<%
If Session("IsMember") then
Response.write "'IsMember' IS TRUE<br>"
Else
Response.write "You are an intruder !<br>You skipped file1.asp"
End if
%>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Evertjan. Guest



Reply With Quote

