Session in ASP is not storing valuesASP.NET session state and multiple worker processessession not working in classic asp on iis server 8Handling hashed passwords stored as varbinary in SQL Server and classic ASPASP Session valueClassic ASP to ASP.Net one-off session data copyPass session value to asp page from aspx pageclassic asp request form and variablesClassic ASP JQuery AJAX not maintaining sessionI need to create a session variable in ASPDestroying ASP SessionsClassic ASP + Javascript - trying to avoid sessionsAndroid Java Volley Persisting the Session in Classic ASP
Why is Ni[(PPh₃)₂Cl₂] tetrahedral?
How to make Flex Markers appear in Logic Pro X?
Three knights or knaves, three different hair colors
mmap: effect of other processes writing to a file previously mapped read-only
Coloring lines in a graph the same color if they are the same length
How to safely discharge oneself
What is the required burn to keep a satellite at a Lagrangian point?
Is it normal to "extract a paper" from a master thesis?
Does science define life as "beginning at conception"?
Why do the i8080 I/O instructions take a byte-sized operand to determine the port?
Writing "hahaha" versus describing the laugh
How many wires should be in a new thermostat cable?
Surface of the 3x3x3 cube as a graph
Why is unzipped file smaller than zipped file
Salesforce bug enabled "Modify All"
Variable does not Exist: CaseTrigger
Way of refund if scammed?
How to eliminate gap at the start and at the end of a line when it's drawn along a side of a node's bounding box?
Why is this integration method not valid?
How did the Allies achieve air superiority on Sicily?
(For training purposes) Are there any openings with rook pawns that are more effective than others (and if so, what are they)?
Can the Conjure Barrage spell stack with the Disarming Attack or Trip Attack Battle Master maneuvers?
size of pointers and architecture
Efficient Algorithms for Destroyed Document Reconstruction
Session in ASP is not storing values
ASP.NET session state and multiple worker processessession not working in classic asp on iis server 8Handling hashed passwords stored as varbinary in SQL Server and classic ASPASP Session valueClassic ASP to ASP.Net one-off session data copyPass session value to asp page from aspx pageclassic asp request form and variablesClassic ASP JQuery AJAX not maintaining sessionI need to create a session variable in ASPDestroying ASP SessionsClassic ASP + Javascript - trying to avoid sessionsAndroid Java Volley Persisting the Session in Classic ASP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have two asp pages in the first page named verify.asp i have write this code:
verify.asp
<%
Username = Request.Form("loginx")
Password = Request.Form("passx")
liberado
Session("liberado") = Username
%>
in the second page i try to use the session variabel "liberado" with any result
barra.asp ,
<%
response.write(session("liberado"))
%>
What i'm making wrong? I m using chrome on IIS of windows 7, Username and Password have values
asp-classic
|
show 1 more comment
I have two asp pages in the first page named verify.asp i have write this code:
verify.asp
<%
Username = Request.Form("loginx")
Password = Request.Form("passx")
liberado
Session("liberado") = Username
%>
in the second page i try to use the session variabel "liberado" with any result
barra.asp ,
<%
response.write(session("liberado"))
%>
What i'm making wrong? I m using chrome on IIS of windows 7, Username and Password have values
asp-classic
You don't need to dimliberado
, but you should dimusername
andpassword
. As for your session being empty, I'd suspect thatloginx
isn't being posted.
– Adam
Mar 18 at 18:31
It’s also possible that Session State is not enabled on the Web Application in IIS.
– Lankymart
Mar 18 at 20:16
1
Possible duplicate of session not working in classic asp on iis server 8
– Lankymart
Mar 18 at 20:17
If session state was disabled I think that would result in a type mismatch error.
– Adam
Mar 18 at 21:01
How to use Session and Application variables in an ASP program
– Lankymart
Mar 18 at 21:42
|
show 1 more comment
I have two asp pages in the first page named verify.asp i have write this code:
verify.asp
<%
Username = Request.Form("loginx")
Password = Request.Form("passx")
liberado
Session("liberado") = Username
%>
in the second page i try to use the session variabel "liberado" with any result
barra.asp ,
<%
response.write(session("liberado"))
%>
What i'm making wrong? I m using chrome on IIS of windows 7, Username and Password have values
asp-classic
I have two asp pages in the first page named verify.asp i have write this code:
verify.asp
<%
Username = Request.Form("loginx")
Password = Request.Form("passx")
liberado
Session("liberado") = Username
%>
in the second page i try to use the session variabel "liberado" with any result
barra.asp ,
<%
response.write(session("liberado"))
%>
What i'm making wrong? I m using chrome on IIS of windows 7, Username and Password have values
asp-classic
asp-classic
edited Mar 18 at 22:03
alejandro carnero
asked Mar 18 at 18:08
alejandro carneroalejandro carnero
80561939
80561939
You don't need to dimliberado
, but you should dimusername
andpassword
. As for your session being empty, I'd suspect thatloginx
isn't being posted.
– Adam
Mar 18 at 18:31
It’s also possible that Session State is not enabled on the Web Application in IIS.
– Lankymart
Mar 18 at 20:16
1
Possible duplicate of session not working in classic asp on iis server 8
– Lankymart
Mar 18 at 20:17
If session state was disabled I think that would result in a type mismatch error.
– Adam
Mar 18 at 21:01
How to use Session and Application variables in an ASP program
– Lankymart
Mar 18 at 21:42
|
show 1 more comment
You don't need to dimliberado
, but you should dimusername
andpassword
. As for your session being empty, I'd suspect thatloginx
isn't being posted.
– Adam
Mar 18 at 18:31
It’s also possible that Session State is not enabled on the Web Application in IIS.
– Lankymart
Mar 18 at 20:16
1
Possible duplicate of session not working in classic asp on iis server 8
– Lankymart
Mar 18 at 20:17
If session state was disabled I think that would result in a type mismatch error.
– Adam
Mar 18 at 21:01
How to use Session and Application variables in an ASP program
– Lankymart
Mar 18 at 21:42
You don't need to dim
liberado
, but you should dim username
and password
. As for your session being empty, I'd suspect that loginx
isn't being posted.– Adam
Mar 18 at 18:31
You don't need to dim
liberado
, but you should dim username
and password
. As for your session being empty, I'd suspect that loginx
isn't being posted.– Adam
Mar 18 at 18:31
It’s also possible that Session State is not enabled on the Web Application in IIS.
– Lankymart
Mar 18 at 20:16
It’s also possible that Session State is not enabled on the Web Application in IIS.
– Lankymart
Mar 18 at 20:16
1
1
Possible duplicate of session not working in classic asp on iis server 8
– Lankymart
Mar 18 at 20:17
Possible duplicate of session not working in classic asp on iis server 8
– Lankymart
Mar 18 at 20:17
If session state was disabled I think that would result in a type mismatch error.
– Adam
Mar 18 at 21:01
If session state was disabled I think that would result in a type mismatch error.
– Adam
Mar 18 at 21:01
How to use Session and Application variables in an ASP program
– Lankymart
Mar 18 at 21:42
How to use Session and Application variables in an ASP program
– Lankymart
Mar 18 at 21:42
|
show 1 more comment
2 Answers
2
active
oldest
votes
There was nothing really wrong with your code. Although I can see you've edited it now to remove the dim
from liberado
, but you've left liberado
behind. This means your ASP will try and call a sub called liberado
, which presumably doesn't exist. You can go ahead and remove that line.
<%
Dim Username, Password
Username = Request.Form("loginx")
Password = Request.Form("passx")
Session("liberado") = Username
%>
Trying to set a session whilst the session state is disabled will probably result in an error of some kind (and you didn't mention an error in your question). But make sure it's enabled by opening IIS and under ASP > Session Properties set "Enable Session State" to "True".
If it's already true then chances are there's something wrong with your form and the data isn't being posted. On your verify.asp page try running the following code:
for each item in request.form
response.write item & ": " & request.form(item) & "<br>"
next
This will output a list of all the form data being posted.
This could also be a cookie issue. If you're blocking cookies from being set in Chrome then there won't be an ASP session cookie, so session values won't be accessible as you move from page to page.
In Chrome press F12 to open developer tools, click the Applications tab, and from the "Cookies" drop down menu select your domain. Check there's an ASPSESSIONID cookie present, and it's the same cookie on both your ASP pages.
add a comment |
Check the application pool settings in IIS. If there are multiple worker processes active under "maximum worker processes", sessions don't always work. Sessions are stored per process, do if a different worker process handles the second request, the session from the first request might be missing. A setting of "0" means IIS uses as many processes as needed.
More information here
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55227581%2fsession-in-asp-is-not-storing-values%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
There was nothing really wrong with your code. Although I can see you've edited it now to remove the dim
from liberado
, but you've left liberado
behind. This means your ASP will try and call a sub called liberado
, which presumably doesn't exist. You can go ahead and remove that line.
<%
Dim Username, Password
Username = Request.Form("loginx")
Password = Request.Form("passx")
Session("liberado") = Username
%>
Trying to set a session whilst the session state is disabled will probably result in an error of some kind (and you didn't mention an error in your question). But make sure it's enabled by opening IIS and under ASP > Session Properties set "Enable Session State" to "True".
If it's already true then chances are there's something wrong with your form and the data isn't being posted. On your verify.asp page try running the following code:
for each item in request.form
response.write item & ": " & request.form(item) & "<br>"
next
This will output a list of all the form data being posted.
This could also be a cookie issue. If you're blocking cookies from being set in Chrome then there won't be an ASP session cookie, so session values won't be accessible as you move from page to page.
In Chrome press F12 to open developer tools, click the Applications tab, and from the "Cookies" drop down menu select your domain. Check there's an ASPSESSIONID cookie present, and it's the same cookie on both your ASP pages.
add a comment |
There was nothing really wrong with your code. Although I can see you've edited it now to remove the dim
from liberado
, but you've left liberado
behind. This means your ASP will try and call a sub called liberado
, which presumably doesn't exist. You can go ahead and remove that line.
<%
Dim Username, Password
Username = Request.Form("loginx")
Password = Request.Form("passx")
Session("liberado") = Username
%>
Trying to set a session whilst the session state is disabled will probably result in an error of some kind (and you didn't mention an error in your question). But make sure it's enabled by opening IIS and under ASP > Session Properties set "Enable Session State" to "True".
If it's already true then chances are there's something wrong with your form and the data isn't being posted. On your verify.asp page try running the following code:
for each item in request.form
response.write item & ": " & request.form(item) & "<br>"
next
This will output a list of all the form data being posted.
This could also be a cookie issue. If you're blocking cookies from being set in Chrome then there won't be an ASP session cookie, so session values won't be accessible as you move from page to page.
In Chrome press F12 to open developer tools, click the Applications tab, and from the "Cookies" drop down menu select your domain. Check there's an ASPSESSIONID cookie present, and it's the same cookie on both your ASP pages.
add a comment |
There was nothing really wrong with your code. Although I can see you've edited it now to remove the dim
from liberado
, but you've left liberado
behind. This means your ASP will try and call a sub called liberado
, which presumably doesn't exist. You can go ahead and remove that line.
<%
Dim Username, Password
Username = Request.Form("loginx")
Password = Request.Form("passx")
Session("liberado") = Username
%>
Trying to set a session whilst the session state is disabled will probably result in an error of some kind (and you didn't mention an error in your question). But make sure it's enabled by opening IIS and under ASP > Session Properties set "Enable Session State" to "True".
If it's already true then chances are there's something wrong with your form and the data isn't being posted. On your verify.asp page try running the following code:
for each item in request.form
response.write item & ": " & request.form(item) & "<br>"
next
This will output a list of all the form data being posted.
This could also be a cookie issue. If you're blocking cookies from being set in Chrome then there won't be an ASP session cookie, so session values won't be accessible as you move from page to page.
In Chrome press F12 to open developer tools, click the Applications tab, and from the "Cookies" drop down menu select your domain. Check there's an ASPSESSIONID cookie present, and it's the same cookie on both your ASP pages.
There was nothing really wrong with your code. Although I can see you've edited it now to remove the dim
from liberado
, but you've left liberado
behind. This means your ASP will try and call a sub called liberado
, which presumably doesn't exist. You can go ahead and remove that line.
<%
Dim Username, Password
Username = Request.Form("loginx")
Password = Request.Form("passx")
Session("liberado") = Username
%>
Trying to set a session whilst the session state is disabled will probably result in an error of some kind (and you didn't mention an error in your question). But make sure it's enabled by opening IIS and under ASP > Session Properties set "Enable Session State" to "True".
If it's already true then chances are there's something wrong with your form and the data isn't being posted. On your verify.asp page try running the following code:
for each item in request.form
response.write item & ": " & request.form(item) & "<br>"
next
This will output a list of all the form data being posted.
This could also be a cookie issue. If you're blocking cookies from being set in Chrome then there won't be an ASP session cookie, so session values won't be accessible as you move from page to page.
In Chrome press F12 to open developer tools, click the Applications tab, and from the "Cookies" drop down menu select your domain. Check there's an ASPSESSIONID cookie present, and it's the same cookie on both your ASP pages.
answered Mar 19 at 11:31
AdamAdam
518139
518139
add a comment |
add a comment |
Check the application pool settings in IIS. If there are multiple worker processes active under "maximum worker processes", sessions don't always work. Sessions are stored per process, do if a different worker process handles the second request, the session from the first request might be missing. A setting of "0" means IIS uses as many processes as needed.
More information here
add a comment |
Check the application pool settings in IIS. If there are multiple worker processes active under "maximum worker processes", sessions don't always work. Sessions are stored per process, do if a different worker process handles the second request, the session from the first request might be missing. A setting of "0" means IIS uses as many processes as needed.
More information here
add a comment |
Check the application pool settings in IIS. If there are multiple worker processes active under "maximum worker processes", sessions don't always work. Sessions are stored per process, do if a different worker process handles the second request, the session from the first request might be missing. A setting of "0" means IIS uses as many processes as needed.
More information here
Check the application pool settings in IIS. If there are multiple worker processes active under "maximum worker processes", sessions don't always work. Sessions are stored per process, do if a different worker process handles the second request, the session from the first request might be missing. A setting of "0" means IIS uses as many processes as needed.
More information here
answered Mar 23 at 21:08
Erik OosterwaalErik Oosterwaal
2,86912152
2,86912152
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55227581%2fsession-in-asp-is-not-storing-values%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You don't need to dim
liberado
, but you should dimusername
andpassword
. As for your session being empty, I'd suspect thatloginx
isn't being posted.– Adam
Mar 18 at 18:31
It’s also possible that Session State is not enabled on the Web Application in IIS.
– Lankymart
Mar 18 at 20:16
1
Possible duplicate of session not working in classic asp on iis server 8
– Lankymart
Mar 18 at 20:17
If session state was disabled I think that would result in a type mismatch error.
– Adam
Mar 18 at 21:01
How to use Session and Application variables in an ASP program
– Lankymart
Mar 18 at 21:42