logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > ASP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 06-30-2008, 09:21 PM   #1
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default Session Variables

Hi there folks,

I have a questions, I got my site in asp and using session variables to carry a username once logged in. I'm having the problem of session variables being carried over from one page to another. Anyone have any ideas why? I thought session variables carried from one page to another as long as it did not time out or close the browser. But here is the kicker if I hit the Refresh button the page shows up correctly and I can display the session variable but then when i move to another part of the site that shows the variable its gone again and I have to hit refresh, sometimes this works with one refresh hit or i have to keep doing it to display it.

How do I correct this problem?
-Thanks
rico1931 is offline   Reply With Quote
Old 07-01-2008, 06:55 AM   #2
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

im not an ASP'er but this might help

http://classicasp.aspfaq.com/general...les-stick.html
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 07-01-2008, 06:57 AM   #3
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

or migrate to PHP and you wont have this problem
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 07-01-2008, 01:54 PM   #4
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default

Quote:
Originally Posted by davidj View Post
or migrate to PHP and you wont have this problem
Trust me I wanted to do this all in PHP but my company I am interning for restricts me to either ASP or ASP.NET. They seem to be loyal to Microsoft and don't wish to stray from them because of "support" they can provide. HA that's all I gatta say but thanks Davidj I'll read up during my lunch break and see if I can't figure something out. Oh and here is something wierd as well, the session variables only work in firefox and not in IE, Opera, or Safari.
rico1931 is offline   Reply With Quote
Old 07-01-2008, 02:23 PM   #5
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

is this a cookie issue

have you allowed cookies on the browsers that dont work

this is the only thing i can think of

what about security settings maybe
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 07-01-2008, 02:47 PM   #6
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default

Quote:
Originally Posted by davidj View Post
is this a cookie issue

have you allowed cookies on the browsers that dont work

this is the only thing i can think of

what about security settings maybe
I thought this too but I enabled cookies on the browsers and checked the security settings and they are all allowing cookies, I also went into the IIS manager under home directory/ configuration/options and enabled everything except for side by side assemblies. I also increased the timeout and nothing. I put in a response.write sessionID into all my web pages and each time a new page is clicked it changes the ID but when I hit refresh it goes back to its original number and works fine. I went through the site and read a little and thats what I got. So now I know something wrong, the hard part is trying to figure out how to fix it now haha. Do you think it could be a problem that I don't have a global.asa file? I would make one but I have no clue where to sart with that.
rico1931 is offline   Reply With Quote
Old 07-01-2008, 03:07 PM   #7
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

not sure mate as its not something i have encountered

sessions should be browser independent so this is weird. Maybe your server is buggy (I'm guessing IIS) try and repair it.

Does the Dir have the correct permissions (Clutching at straws here)?

do you have more than one instance of the browser /s open under the same login. Maybe a conflict of sorts?
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Old 07-01-2008, 05:14 PM   #8
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default

I know its soo strange but opera seems to hold the sessionID just fine while safari, mozilla, and IE seems to change them every time. I think I will just try to go around the problem and make a global.asp file with the function to hold the sessionID. Then pass the variable through my web pages so the sessionID stays the same when they first visti the site. Do you think this is the best approach? i.e do you think this will work lol. I am going to go and try to learn how to properly use the Session_OnStart function but any help on how to begin will be greatly appreciated!
rico1931 is offline   Reply With Quote
Old 07-01-2008, 06:04 PM   #9
rico1931
 
Join Date: Jun 2008
Location: Buffalo
Posts: 198
Default Template

hey davidj I finally did some more debugging and found that the issue is located somewhere in my damn template. So I need to redo the whole template but I don't get it. I have nothing in the template to change session Variables. Or do I and I am just not seeing it. Can you or anyone else here tell me where im going wrong with it. I spent a lot of time and the company really likes this template I don't just want to throw it away but I've spent so much time on this and need to move forward. Any feedback or advice would be greatly appreciated.
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>DMIC Final Template</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<style type="text/css">
<!--
body {
    background-image: url(/%7Eimages/site/gradiant.gif);
    background-repeat: repeat-x;
    font-family: sans-serif;
    font-size: 10px;
}
#Container {
    width:815px;
    height:auto;
    z-index:1;
    background-color: #ECEBE8;
    margin: auto;
}
#Banner {
    left:17px;
    top:12px;
    width:800px;
    height:auto;
    z-index:2;
}
#LogIn {
    width:150px;
    height:auto;
    z-index:20;
    float: right;
}
#BannerLogo {
    border: 2px solid #ECEBE8;
}
#TopNav {
    width:auto;
    height:40px;
    z-index:2;
}
#LeftNav {
    left:19px;
    top:125px;
    width:100px;
    height:200px;
    z-index:2;
    float: left;
}
#Content {
    left:132px;
    top:125px;
    height:355px;
    z-index:3;
    margin: 1px;
}
-->
</style>

<script src="../SpryAssets/SpryMenuBar.js" type="text/javascript"></script>

<link href="../SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="Container">
    <div id="Banner">



<div id="LogIn">
<!-- TemplateBeginEditable name="LogInEdit" -->
Log In information will be inserted here.
<!-- TemplateEndEditable --></div>

         <div id="BannerLogo">  <img src="/~images/site/dmic_header.gif" alt="DMIC_Logo" width="600" height="90"/>
      </div>
    </div>
    
  <div id="TopNav">
    <ul id="MenuBar1" class="MenuBarHorizontal">
      <li><a href="/Default.asp">Home</a>        </li>
      <li><a href="#" class="MenuBarItemSubmenu">Products</a>
        <ul>
          <li><a href="#" class="MenuBarItemSubmenu">Fluid Control Valves</a>
            <ul>
              <li><a href="/~prods/F01/bv/Ball_Valves.asp">Ball Valves</a></li>
              <li><a href="/~prods/F01/cv/Check_Valves.asp">Check Valves</a></li>
              <li><a href="/~prods/F01/fc/Flow_Controls.asp">Flow Controls</a></li>
            </ul>
          </li>
          <li><a href="#" class="MenuBarItemSubmenu">Filtration</a>
            <ul>
              <li><a href="/~prods/F02/so/SpinOn_Assembles.asp">Spin On Assembles</a></li>
              <li><a href="/~prods/F02/so/SpingOn_Mix_Match.asp">Spin on Mix + Match</a></li>
            </ul>
          </li>
          <li><a href="#" class="MenuBarItemSubmenu">Gauges &amp; Isolators</a>
            <ul>
              <li><a href="/~prods/F03/ga/Gauges.asp">Gauges</a></li>
              <li><a href="/~prods/F03/gi/Single_Station_Isolators.asp">Single Station Isolators</a></li>
              <li><a href="/~prods/F03/gi/Multi_Station_Isolators.asp">Multi station Isolators</a></li>
              <li><a href="/~prods/F03/ga/Gauge_Valves.asp">Gauges Valves</a></li>
              <li><a href="/~prods/F03/gi/Snubbers.asp">Snubbers</a></li>
            </ul>
          </li>
          <li><a href="#" class="MenuBarItemSubmenu">SAE Flanges</a>
            <ul>
              <li><a href="/~prods/F04/sf/Split_Flanges.asp">Split Flanges</a></li>
              <li><a href="/~prods/F04/th/Threaded_Flanges.asp">Threaded Flanges</a></li>
              <li><a href="/~prods/F04/th/Threaded_90_Elbows.asp">Threaded 90&deg; Elbows</a></li>
              <li><a href="/~prods/F04/sw/Socket_Weld_Flanges.asp">Socket Weld Flanges</a></li>
              <li><a href="/~prods/F04/sw/Socket_Weld_90_Elbows.asp">Socket Weld 90&deg; Elbows</a></li>
              <li><a href="/~prods/F04/bw/Butt_Weld.asp">Butt Weld</a></li>
              <li><a href="/~prods/F04/bl/Blank_Flanges.asp">Blank Flanges</a></li>
              <li><a href="/~prods/F04/hw/Hardware.asp">Hardware</a></li>
            </ul>
          </li>
          <li><a href="#" class="MenuBarItemSubmenu">Hydrawlic Accessories</a>
            <ul>
              <li><a href="/~prods/F05/fb/Filler_Breathers.asp">Filler Breathers</a></li>
              <li><a href="/~prods/F05/lg/Level_Gauges.asp">Level Gauges</a></li>
              <li><a href="/~prods/F05/lgm/Leve_Guage_Manifold.asp">Level Gauges Manifold</a></li>
            </ul>
          </li>
          <li><a href="#" class="MenuBarItemSubmenu">Components</a>
            <ul>
              <li><a href="/~prods/F06/gp/Gear_Pumps.asp">Gear Pumps</a></li>
              <li><a href="/~prods/F06/pp/10,000_PSI_Piston_Pumps.asp">10,000 PSI Piston Pumps</a></li>
              <li><a href="/~prods/F06/fd/Flow_Dividers.asp">Flow Dividers</a></li>
              <li><a href="/~prods/F06/hydac/Hydrawlic_Actuators.asp">Hydrawlic Actuators</a></li>
            </ul>
          </li>
          <li><a href="#" class="MenuBarItemSubmenu">Power Unit Layout</a>
            <ul>
              <li><a href="/~prods/F07/intro/Introduction.asp">Introduction</a></li>
              <li><a href="/~prods/F07/sw-th/Socket_Weld_to_Thread.asp">Socket Weld to Thread</a></li>
              <li><a href="/~prods/F07/hb-th/Hose_Barb_to_Thread.asp">Hose Barb to Thread</a></li>
              <li><a href="/~prods/F07/hbspec/Hose_Barb_Specialties.asp">Hose Barb Specialties</a></li>
              <li><a href="/~prods/F07/saeflagadapt/SAE_Split_Flange_Adapters.asp">SAE Split Flange Adapters</a></li>
              <li><a href="/~prods/F07/4fcomp/4-Bolt_Companion.asp">SAE 4-Bolt Companion</a></li>
              <li><a href="/~prods/F07/4fstd/4-Bolt_Standard.asp">SAE 4-Bolt Standard</a></li>
              <li><a href="/~prods/F07/rtools/Reservoir_Layout_tools.asp">Reservoir Layout Tools</a></li>
              <li><a href="/~prods/F07/bval/Bval_low_pressure_Ball_Valves.asp">BVAL Low Pressure Ball Valves</a></li>
            </ul>
          </li>
        </ul>
      </li>
      <li><a href="#">Technical</a>        </li>
      <li><a href="#">News</a></li>
      <li><a href="/Admin_Testing.asp" class="MenuBarItemSubmenu">Admin Testing</a>
        <ul>
          <li><a href="/Admin_Testing_Page/User_Page.asp">Current User Page</a></li>
          <li><a href="/Admin_Testing_Page/Update_User.asp">Update Information</a></li>
          <li><a href="/Admin_Testing_Page/Upload.asp">Upload Test</a></li>
        </ul>
       </li>
    </ul>
  </div>
    
  <div id="LeftNav">
    <!-- TemplateBeginEditable name="LefNavEdit" -->
    Left nave will be place here
    <!-- TemplateEndEditable -->
    </div>
    
    <div id="Content">
    <!-- TemplateBeginEditable name="MainContent" -->
    All content will be place here  
    <!-- TemplateEndEditable -->
    </div>
    
</div>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"/SpryAssets/SpryMenuBarDownHover.gif", imgRight:"/SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
</html>
rico1931 is offline   Reply With Quote
Old 07-01-2008, 06:29 PM   #10
davidj
davidj's Avatar
 
Join Date: Sep 2005
Location: The Toon (newcastle upon Tyne)
Posts: 8,256
Default

i dont know myself

is this valid as part of your links...
Code:
 
"/~prods
__________________
Would you like to learn PHP from me? Check out -> www.codezenith.co.uk
davidj is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:18 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com