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;








0















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










share|improve this question
























  • 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






  • 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


















0















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










share|improve this question
























  • 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






  • 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














0












0








0








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










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 18 at 22:03







alejandro carnero

















asked Mar 18 at 18:08









alejandro carneroalejandro carnero

80561939




80561939












  • 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






  • 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











  • 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













2 Answers
2






active

oldest

votes


















1














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.






share|improve this answer






























    0














    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



    enter image description here






    share|improve this answer























      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
      );



      );













      draft saved

      draft discarded


















      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









      1














      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.






      share|improve this answer



























        1














        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.






        share|improve this answer

























          1












          1








          1







          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.






          share|improve this answer













          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 19 at 11:31









          AdamAdam

          518139




          518139























              0














              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



              enter image description here






              share|improve this answer



























                0














                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



                enter image description here






                share|improve this answer

























                  0












                  0








                  0







                  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



                  enter image description here






                  share|improve this answer













                  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



                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 23 at 21:08









                  Erik OosterwaalErik Oosterwaal

                  2,86912152




                  2,86912152



























                      draft saved

                      draft discarded
















































                      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.




                      draft saved


                      draft discarded














                      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





















































                      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







                      Popular posts from this blog

                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                      Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                      Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript