Ask a Question related to ASP, Design and Development.

  1. #41

    Default Re: session variables

    I am using the query and then setiing the session variables based on the query result. Don't I need a CFLock for that session variables that I set ?
    voodoofrdr Guest

  2. Similar Questions and Discussions

    1. #39833 [NEW]: Session variables overwritten by local variables (register_globals=off)
      From: sup1382 at accedo dot es Operating system: OpenBSD 3.9 PHP version: 5.2.0 PHP Bug Type: Session related Bug...
    2. #39447 [NEW]: Want to optionally handle apc_upload_progress variables using session variables
      From: krudtaa at yahoo dot com Operating system: All PHP version: 5.2.0 PHP Bug Type: Feature/Change Request Bug...
    3. Session Variables in .NET
      Hi, I am starting to develop an ASP.Net application. I will have a logon page which will take a UserName and Password. A Stored Procedure will...
    4. Session problem when setting session variables in files that are in different directories
      I am running PHP 4.3.0 on a WinXPpro machine and I recently got problem with sessions. What I am building is a loginsystem and I need to save...
    5. variables that change session variables
      Hi, I'm currently writing a mulit-page form app that uses a session to retain data from each form element in order for the user to jump between...
  3. #42

    Default Re: session variables

    >... I am using the query and then setiing the session variables based on the
    >... query result. Don't I need a CFLock for that session variables that I set
    ?
    Yes, you need locks for session variables. But it is very bad for performance
    to enclose a query within cflock. I can see that you yourself already
    anticipated
    one problem, and used a high timeout value for the lock. One advantage of
    separating the session variables from the query is that you can use a much
    smaller value for the timeout.

    Do something like




    <cflock scope="SESSION" type="EXCLUSIVE" timeout="5">
    <cfset session.myVar = "#varValue#">
    </cflock>

    <cflock scope="SESSION" type="READONLY" timeout="10">
    <cfset request.tempVar = "#session.myVar#">
    </cflock>

    <cfquery name="x" datasource="dsn">
    select myCol
    from myTable
    where myOtherCol = '#request.tempVar#'
    </cfquery>

    BKBK Guest

  4. #43

    Default Re: session variables

    Thank you for the code. BUt hte question I have is when I set session.myVar2
    and the timeout is 5 secs, can i still use that session variable for the rest
    of the application or will it timeout.

    <cflock scope="SESSION" type="EXCLUSIVE" timeout="5">
    <cfset session.myVar2 = "#myQuery.myCol#">
    </cflock>

    voodoofrdr Guest

  5. #44

    Default Re: session variables

    >... can i still use that session variable for the rest of the application
    Yes. Each time, make sure you lock appropriately.
    >... timeout is 5 secs... will it timeout.
    No. The timeout is simply the maximum time that you give Coldfusion
    to execute the code in that particular cflock. If it doesn't do that in 5 secs,
    an error is generated. There is another possibility. If the throwOnTimeout
    attribute of cflock is set to "no", and the lock times out, Coldfusion simply
    execution continues past the tag. In any case, in your examples here,
    5 seconds is far, far more than sufficient.





    BKBK Guest

  6. #45

    Default Re: session variables

    Thank you, that makes it clear in my mind how all this work.
    voodoofrdr Guest

  7. #46

    Default Session Variables

    Hi,

    My asp application needs 2 variables (uid, password) which i need for
    running sql statements.

    This is not the same uid , password used for the logging by the user, but
    are supplied by a Radius server. My problem is i'm supplied with the uid,
    password only once by the Radius server(on the first page) , so i need to
    store them. The thing is if i store them in the session they are visible to
    the user. So that should be avoided... Been thinking about encrypting the
    variabels, but cant find default vb code to encrypt the data. Actualy i don't
    want to send any info at all...
    Are there any other options i did not think off.

    Any help would be greatly appriciated!
    Thanks in advance !!!

    Rob Smeets
    Rob Smeets Guest

  8. #47

    Default Re: Session Variables


    "Rob Smeets" <RobSmeets@discussions.microsoft.com> wrote in message
    news:C5014D93-DB6A-4AB8-9E37-2DAD5A1C2D47@microsoft.com...
    > Hi,
    >
    > My asp application needs 2 variables (uid, password) which i need for
    > running sql statements.
    >
    > This is not the same uid , password used for the logging by the user, but
    > are supplied by a Radius server. My problem is i'm supplied with the uid,
    > password only once by the Radius server(on the first page) , so i need to
    > store them. The thing is if i store them in the session they are visible
    > to
    > the user. So that should be avoided... Been thinking about encrypting the
    Hi Rob,

    You make a mistake. If you store variables in the Session object, they are
    only at the server. I think you mix up, these variables using cookies or
    hidden input fields.

    --
    compatible web farm Session replacement for Asp and Asp.Net
    [url]http://www.nieropwebconsult.nl/asp_session_manager.htm[/url]
    > variabels, but cant find default vb code to encrypt the data. Actualy i
    > don't
    > want to send any info at all...
    > Are there any other options i did not think off.
    >
    > Any help would be greatly appriciated!
    > Thanks in advance !!!
    >
    > Rob Smeets
    Egbert Nierop \(MVP for IIS\) Guest

  9. #48

    Default Re: Session Variables

    Your right...

    Thanks a Mil

    Rob Smeets

    "Egbert Nierop (MVP for IIS)" wrote:
    >
    > "Rob Smeets" <RobSmeets@discussions.microsoft.com> wrote in message
    > news:C5014D93-DB6A-4AB8-9E37-2DAD5A1C2D47@microsoft.com...
    > > Hi,
    > >
    > > My asp application needs 2 variables (uid, password) which i need for
    > > running sql statements.
    > >
    > > This is not the same uid , password used for the logging by the user, but
    > > are supplied by a Radius server. My problem is i'm supplied with the uid,
    > > password only once by the Radius server(on the first page) , so i need to
    > > store them. The thing is if i store them in the session they are visible
    > > to
    > > the user. So that should be avoided... Been thinking about encrypting the
    >
    > Hi Rob,
    >
    > You make a mistake. If you store variables in the Session object, they are
    > only at the server. I think you mix up, these variables using cookies or
    > hidden input fields.
    >
    > --
    > compatible web farm Session replacement for Asp and Asp.Net
    > [url]http://www.nieropwebconsult.nl/asp_session_manager.htm[/url]
    > > variabels, but cant find default vb code to encrypt the data. Actualy i
    > > don't
    > > want to send any info at all...
    > > Are there any other options i did not think off.
    > >
    > > Any help would be greatly appriciated!
    > > Thanks in advance !!!
    > >
    > > Rob Smeets
    >
    >
    Rob Smeets Guest

  10. #49

    Default session variables

    Is this possible using only Dreamweaver behaviours and no coding?
    Four pages:
    1) User Registers and form entries go to database (this part works fine for me
    now).
    2) Welcome page greets new user with some of the fields from (1) ie -
    firstname, lastname, username, password
    3) Login page (from welcome) where user enters username & password (no cookies
    needed - I want user to manually enter this information)
    4) User Update. Page is populated from session variable for current user.
    User is able to edit fields.

    I have read no less than 3 books (Foundation PHP is the best one) and they all
    have what seems to be a different way of doing this and it is very confusing.
    I am trying to put a site together with the elements listed above and have not
    been successful. I really would like to understand how this works, but I think
    I need to get it functioning, so I can understand.

    Mr. Brownie 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