Ask a Question related to ASP, Design and Development.

  1. #1

    Default Session Variable

    Is it true that when your ASP application jump's from one
    Virtual Directory to another Virtual directory then you
    cannot access session variables (which you created in
    previous virtual directory pages).

    Is there any way to work-around that? I don't want to
    create the new session variables.

    Gmmi Guest

  2. Similar Questions and Discussions

    1. #39634 [NEW]: session variable and normal variable
      From: erhanbaris at gmail dot com Operating system: Win Xp SP1 PHP version: 5.2.0 PHP Bug Type: Variables related Bug...
    2. session variable and IE
      Hi there, I have a session variable that holds an user name, after user logs in. All works just fine in development environment (Intranet) for IE...
    3. Session Variable in IIS 5
      Hi, i can't use a Session variable in IIS 5, when i try to assign a value send to me next erro messages "Microsoft VBScript runtime (0x800A000D)...
    4. Datalist - how (if) to use a sub variable or session variable in the footer?
      Hi, sorry to be greedy with all my posts lately, but can you tell I'm doing new things this week? I've just done my first datalist (a simple...
    5. [SESSION] Session variable deleted prior to command?
      Hi all, I'm developing a database system on my local computer (OS/version details at bottom) with a simple user authentication using sessions. On...
  3. #2

    Default Re: Session Variable

    Ray for me it's not working. Due you know any reason? or
    you are here just for fun.

    Gmmi.

    >-----Original Message-----
    >Have you tested this to see if it's true?
    >
    >Ray at work
    >
    >"Gmmi" <ali760@hotmail.com> wrote in message
    >news:307d01c33fdd$5d17f7c0$a601280a@phx.gbl...
    >> Is it true that when your ASP application jump's from
    one
    >> Virtual Directory to another Virtual directory then you
    >> cannot access session variables (which you created in
    >> previous virtual directory pages).
    >>
    >> Is there any way to work-around that? I don't want to
    >> create the new session variables.
    >>
    >
    >
    >.
    >
    Gmmi Guest

  4. #3

    Default Re: Session Variable

    [email]ray@securitynat.com[/email].

    If this is a joke to mess with my mind, hopes, and dreams, I'll hack into
    your site and put pornography on it. ;]

    Ray at work

    "UR ednec" <pmckenna9999@yahoo.com> wrote in message
    news:%23FelQF%23PDHA.1148@TK2MSFTNGP11.phx.gbl...
    > Ray! What is your email id? Got a job offer fer ya!
    >
    > "Ray at <%=sLocation%>" <ask@me.forit> wrote in message
    > news:%23lZeC39PDHA.1624@tk2msftngp13.phx.gbl...
    > > Have you tested this to see if it's true?
    > >
    > > Ray at work
    > >
    > > "Gmmi" <ali760@hotmail.com> wrote in message
    > > news:307d01c33fdd$5d17f7c0$a601280a@phx.gbl...
    > > > Is it true that when your ASP application jump's from one
    > > > Virtual Directory to another Virtual directory then you
    > > > cannot access session variables (which you created in
    > > > previous virtual directory pages).
    > > >
    > > > Is there any way to work-around that? I don't want to
    > > > create the new session variables.
    > > >
    > >
    > >
    >
    >

    Ray at Guest

  5. #4

    Default Re: Session Variable

    If you have an application set in IIS for the directory, the session
    variables will not carry through. Like, example:

    [url]http://site/dir1/page1.asp[/url] contains:
    session("test") = "test"

    [url]http://site/dir2/page1.asp[/url] contains:
    response.write session("test")

    That will work fine, by default. But if you go into your IIS manager and
    create an application on dir2, you will lose the session variables in there.
    Session variables are application based. If you don't need to have this
    directory specified as a separate application, just remove it in IIS, and
    your session variables will carry through.

    Ray at work


    "Gmmi" <ali760@hotmail.com> wrote in message
    news:06c601c33fe3$f15ce930$a001280a@phx.gbl...
    > Ray for me it's not working. Due you know any reason? or
    > you are here just for fun.
    >
    > Gmmi.
    >
    >
    > >-----Original Message-----
    > >Have you tested this to see if it's true?
    > >
    > >Ray at work
    > >
    > >"Gmmi" <ali760@hotmail.com> wrote in message
    > >news:307d01c33fdd$5d17f7c0$a601280a@phx.gbl...
    > >> Is it true that when your ASP application jump's from
    > one
    > >> Virtual Directory to another Virtual directory then you
    > >> cannot access session variables (which you created in
    > >> previous virtual directory pages).
    > >>
    > >> Is there any way to work-around that? I don't want to
    > >> create the new session variables.
    > >>
    > >
    > >
    > >.
    > >

    Ray at Guest

  6. #5

    Default Re: Session Variable

    Could you put some on my site too? I need the traffic.

    Bob Lehmann

    "Ray at <%=sLocation%>" <ask@me.forit> wrote in message
    news:ufKUrR#PDHA.3664@tk2msftngp13.phx.gbl...
    > [email]ray@securitynat.com[/email].
    >
    > If this is a joke to mess with my mind, hopes, and dreams, I'll hack into
    > your site and put pornography on it. ;]
    >
    > Ray at work
    >
    > "UR ednec" <pmckenna9999@yahoo.com> wrote in message
    > news:%23FelQF%23PDHA.1148@TK2MSFTNGP11.phx.gbl...
    > > Ray! What is your email id? Got a job offer fer ya!
    > >
    > > "Ray at <%=sLocation%>" <ask@me.forit> wrote in message
    > > news:%23lZeC39PDHA.1624@tk2msftngp13.phx.gbl...
    > > > Have you tested this to see if it's true?
    > > >
    > > > Ray at work
    > > >
    > > > "Gmmi" <ali760@hotmail.com> wrote in message
    > > > news:307d01c33fdd$5d17f7c0$a601280a@phx.gbl...
    > > > > Is it true that when your ASP application jump's from one
    > > > > Virtual Directory to another Virtual directory then you
    > > > > cannot access session variables (which you created in
    > > > > previous virtual directory pages).
    > > > >
    > > > > Is there any way to work-around that? I don't want to
    > > > > create the new session variables.
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Bob Lehmann Guest

  7. #6

    Default Re: Session Variable

    How's that saying go...... about the cobbler having no shoes :>)

    Bob Lehmann

    "Ray at <%=sLocation%>" <ask@me.forit> wrote in message
    news:#GAeap#PDHA.1720@TK2MSFTNGP11.phx.gbl...
    > Yeah, you need something on your site other than a mailto link. :]
    >
    > Ray at work
    >
    > "Bob Lehmann" <bob@activeinet.com> wrote in message
    > news:OWqYMk%23PDHA.1720@TK2MSFTNGP11.phx.gbl...
    > > Could you put some on my site too? I need the traffic.
    > >
    > > Bob Lehmann
    > >
    > > "Ray at <%=sLocation%>" <ask@me.forit> wrote in message
    > > news:ufKUrR#PDHA.3664@tk2msftngp13.phx.gbl...
    > > > [email]ray@securitynat.com[/email].
    > > >
    > > > If this is a joke to mess with my mind, hopes, and dreams, I'll hack
    > into
    > > > your site and put pornography on it. ;]
    > > >
    > > > Ray at work
    > > >
    > > > "UR ednec" <pmckenna9999@yahoo.com> wrote in message
    > > > news:%23FelQF%23PDHA.1148@TK2MSFTNGP11.phx.gbl...
    > > > > Ray! What is your email id? Got a job offer fer ya!
    > > > >
    > > > > "Ray at <%=sLocation%>" <ask@me.forit> wrote in message
    > > > > news:%23lZeC39PDHA.1624@tk2msftngp13.phx.gbl...
    > > > > > Have you tested this to see if it's true?
    > > > > >
    > > > > > Ray at work
    > > > > >
    > > > > > "Gmmi" <ali760@hotmail.com> wrote in message
    > > > > > news:307d01c33fdd$5d17f7c0$a601280a@phx.gbl...
    > > > > > > Is it true that when your ASP application jump's from one
    > > > > > > Virtual Directory to another Virtual directory then you
    > > > > > > cannot access session variables (which you created in
    > > > > > > previous virtual directory pages).
    > > > > > >
    > > > > > > Is there any way to work-around that? I don't want to
    > > > > > > create the new session variables.
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Bob Lehmann Guest

  8. #7

    Default Session Variable

    I have a website running on IIS 5.0. The users are authenticated using
    certificates mapped to their windows username. This si done behind the
    scenes so the user does not actually have to login.

    Is there anyway to get this username into a session variable? I am able to
    do if I create an actual login page and have their usernames in a seperate
    database.

    Thanks,
    Darren


    Darren Woodbrey Guest

  9. #8

    Default Re: Session Variable

    I think that using the Request.ServerVariables should do what you want.
    Check out the MSDN information on it at
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/[/url]
    servervariables.asp

    Blair



    Darren Woodbrey <darrenwoodbrey@hpfairfield.com> wrote in article
    <udSR0H6JEHA.892@TK2MSFTNGP09.phx.gbl>...
    > I have a website running on IIS 5.0. The users are authenticated using
    > certificates mapped to their windows username. This si done behind the
    > scenes so the user does not actually have to login.
    >
    > Is there anyway to get this username into a session variable? I am able
    to
    > do if I create an actual login page and have their usernames in a
    seperate
    > database.
    >
    > Thanks,
    > Darren
    Blair Bonnett Guest

  10. #9

    Default Session variable

    I need to save my user login information and am trying to use
    Session.Add("USERID","NAME");

    But then how do I get that information out into a local variable?

    Thanks,
    Bryan


    Micosoft Guest

  11. #10

    Default Re: Session variable

    I'm not familiar with any .Add method of the session object.

    Session object:
    Methods:
    Abandon
    Properties:
    CodePage
    Contents
    LCID
    SessionID
    StaticObjects
    Timeout
    Value

    Try: Session("USERID") = "NAME"

    Also, this isn't database (db) related. Please use the
    inetserver.asp.general for such questions.

    Ray at work

    "Micosoft" <garret_computing@hotmail.com> wrote in message
    news:uL$C$$2NEHA.540@TK2MSFTNGP11.phx.gbl...
    > I need to save my user login information and am trying to use
    > Session.Add("USERID","NAME");
    >
    > But then how do I get that information out into a local variable?
    >
    > Thanks,
    > Bryan
    >
    >

    Ray at Guest

  12. #11

    Default Re: Session variable

    Thanks, I will

    But just so you know when I used Session("USERID") = "NAME"; I get

    'System.Web.UI.Page.Session' denotes a 'property' where a 'method' was
    expected



    "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
    message news:%23Lr6vD3NEHA.3960@TK2MSFTNGP10.phx.gbl...
    > I'm not familiar with any .Add method of the session object.
    >
    > Session object:
    > Methods:
    > Abandon
    > Properties:
    > CodePage
    > Contents
    > LCID
    > SessionID
    > StaticObjects
    > Timeout
    > Value
    >
    > Try: Session("USERID") = "NAME"
    >
    > Also, this isn't database (db) related. Please use the
    > inetserver.asp.general for such questions.
    >
    > Ray at work
    >
    > "Micosoft" <garret_computing@hotmail.com> wrote in message
    > news:uL$C$$2NEHA.540@TK2MSFTNGP11.phx.gbl...
    > > I need to save my user login information and am trying to use
    > > Session.Add("USERID","NAME");
    > >
    > > But then how do I get that information out into a local variable?
    > >
    > > Thanks,
    > > Bryan
    > >
    > >
    >
    >

    TWACS Guest

  13. #12

    Default Re: Session variable

    [url]http://www.aspfaq.com/5002[/url]
    [url]http://www.aspfaq.com/5003[/url]

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]




    "TWACS" <garret_computing@hotmail.com> wrote in message
    news:OPdNAK3NEHA.3476@TK2MSFTNGP09.phx.gbl...
    > Thanks, I will
    >
    > But just so you know when I used Session("USERID") = "NAME"; I get
    >
    > 'System.Web.UI.Page.Session' denotes a 'property' where a 'method' was
    > expected
    >
    >
    >
    > "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
    > message news:%23Lr6vD3NEHA.3960@TK2MSFTNGP10.phx.gbl...
    > > I'm not familiar with any .Add method of the session object.
    > >
    > > Session object:
    > > Methods:
    > > Abandon
    > > Properties:
    > > CodePage
    > > Contents
    > > LCID
    > > SessionID
    > > StaticObjects
    > > Timeout
    > > Value
    > >
    > > Try: Session("USERID") = "NAME"
    > >
    > > Also, this isn't database (db) related. Please use the
    > > inetserver.asp.general for such questions.
    > >
    > > Ray at work
    > >
    > > "Micosoft" <garret_computing@hotmail.com> wrote in message
    > > news:uL$C$$2NEHA.540@TK2MSFTNGP11.phx.gbl...
    > > > I need to save my user login information and am trying to use
    > > > Session.Add("USERID","NAME");
    > > >
    > > > But then how do I get that information out into a local variable?
    > > >
    > > > Thanks,
    > > > Bryan
    > > >
    > > >
    > >
    > >
    >
    >

    Aaron Bertrand - MVP Guest

  14. #13

    Default Session variable

    Maybe somebody had the same problem. we are running under
    Windows 2003 with load balance for 2 web services and I
    started to have a problem with session variable. Some time
    is not available. Any idea why?
    Example: on the same page 9 out of 10 okey for session
    variable and 1 time is not there. No error msg displayed.
    anonymous Guest

  15. #14

    Default Re: Session variable

    Do I understand that you have more than one server that can handle requests?
    If there's no guarantee that the same server will handle every request from
    the same browser, you can't count on the Session to be there. With multiple
    servers, people store the session state on a third machine or in a database.

    See the section titled Session State Management here:

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpatterns/html/DesLoadBalancedCluster.asp[/url]


    "anonymous" <anonymous@discussions.microsoft.com> wrote in message
    news:1abe01c51e83$6c5b02a0$a501280a@phx.gbl...
    > Maybe somebody had the same problem. we are running under
    > Windows 2003 with load balance for 2 web services and I
    > started to have a problem with session variable. Some time
    > is not available. Any idea why?
    > Example: on the same page 9 out of 10 okey for session
    > variable and 1 time is not there. No error msg displayed.
    Ken Cox [Microsoft MVP] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139