Announcement

Collapse
No announcement yet.

Session variables sometimes lost when asp in a frameset...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Session variables sometimes lost when asp in a frameset...

    When I use frames to keep my new personality testing site URL displaying, some machines will lose the session variables so I end up back at the login, yet most are perfectly fine. The failing machines never work...the others always work.

    If I access the pages directly (i.e. no frameset) there is never a problem on any machine.

    I can't find anything different on the few machines that fail (an XP home laptop, and XP home desktop and a win2k3 server box so far)...what might be causing it?

    TIA

    T.
    FT.

  • #2
    Ok, so it was obviously far too difficult for all you murcers! (Or too easy and you were keeping quiet, but you wouldn't be that unhelpful would you? )

    The problem was cookies and privacy settings. If I display the site using a frame provided by my domain-name seller (Easily), then my session variables are in a temporary-cookie that appears to be coming from a third party, so it wasn't going to be allowed unless privacy settings are set to low or my domain is trusted.

    My solution: Don't use the frames from Easily, which loses me my pretty URL, but use my own frame set so my page names are hidden but at least the cookies should work.

    Unless anyone has a better idea...?

    T.
    FT.

    Comment


    • #3
      A better idea would be to port your site to .Net. It's easier than you think. You just need to spend a little time getting comfortable with the changes. There are lots of tutorials out there that explain the process.

      You don't need to use frames anymore because every control can post back to it's own event handler and you don't need to waste time decoding the returned data to figure out what your user did and how you have to respond. .Net has viewstate too so you don't have to rewrite values into your controls when you redraw the page. Complex tasks like filling dropdown lists and changing the options in one drop down list based on what was selected in another become almost effortless compared to what you have to do in ASP.

      Session is also much better under .Net then ASP. The dev community basically thinks of session under ASP as broken.

      I'm not going to try to reproduce a thorough treatise on why .Net is so much better than ASP because there's lots of better explanations already out there. If you're interested, I can provide some links to sites that I've found helpful.
      P.S. You've been Spanked!

      Comment


      • #4
        Thanks for the advice Schmosef.

        For this project I don't really have a choice. I have used the tool that is available in my institution. For future projects it could be a possibility, and perhaps worth investing in if it improves functionality and/or reduces development time.

        Ironically I'm going on a SQL server 2000 programming course in a couple of weeks, closing the door way after this horse has bolted. A .net course should be available later this year though

        Your bookmarks could be helpful, thanks.

        T.
        FT.

        Comment


        • #5
          in no particular order:

          Experts Exchange is the Q&A community for people tired of the AI sellout. It's the best place to connect with experts who can answer tough technology questions.

          Learn with interactive lessons and technical documentation, earn professional development hours and certifications, and connect with the community.

          Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.


          eSports News, Results, upcoming Matches & live Matches. Learn tricks and guides in the esports space. ✅ We cover CS:GO, Dota 2, LOL, Overwatch & PUBG. 
          P.S. You've been Spanked!

          Comment

          Working...
          X