With Classic ASP, the session state was easily implemented using session("someName") = "someValue".
With a current ASP.NET app I'm trying out, I want to restrict the user from a "member" area by verifying that they logged in appropriately. To do this, I want to activate a session flag variable as true at the login page, and if anyone tries to hit a page where they need authorization, but they do not have that session flag verifying that they logged in, it will kick them out.
When implementing the checking / verifying page, I entered the following code, and the .NET framework gave me a compilation error that says: BC30512: Option Strict On disallows implicit conversions from 'String' to 'Long'.
I'm not sure how it is being converted to a Long value. Does anyone else have any idea why this isn't working?
Code on flagChecker.aspx
-Ovatvvon :-Q
With a current ASP.NET app I'm trying out, I want to restrict the user from a "member" area by verifying that they logged in appropriately. To do this, I want to activate a session flag variable as true at the login page, and if anyone tries to hit a page where they need authorization, but they do not have that session flag verifying that they logged in, it will kick them out.
When implementing the checking / verifying page, I entered the following code, and the .NET framework gave me a compilation error that says: BC30512: Option Strict On disallows implicit conversions from 'String' to 'Long'.
I'm not sure how it is being converted to a Long value. Does anyone else have any idea why this isn't working?
Code on flagChecker.aspx
Code:
<%
If session("signupFlag") Is Not "True" Then
Dim msg as String
msg = "You do not have authorization to access this area."
Response.Redirect("/noAccess.aspx?msg=" & Server.URLEncode(msg))
Response.End
End If
%>
-Ovatvvon :-Q