Professional Web Applications Themes

Application.Lock - allows read?? - ASP.NET General

Quick question about Application.Lock()... When you lock the application, does it still allow read access, or does it deny read as well as write? thanks in advance, - Aaron....

  1. #1

    Default Application.Lock - allows read??

    Quick question about Application.Lock()...

    When you lock the application, does it still allow read access, or does it
    deny read as well as write?

    thanks in advance,

    - Aaron.


    Eidolon Guest

  2. #2

    Default Application.Lock - allows read??

    Hi,
    The Lock method blocks other clients from modifying the
    variables stored in the Application object, ensuring that
    only one client at a time can alter or access the
    Application variables.

    regards
    Sreejumon[MVP]
    www.mstechzone.com 
    access, or does it 
    Sreejumon[MVP] Guest

  3. #3

    Default Re: Application.Lock - allows read??

    It still allows read access while it is locked. The lock only applies to
    writing data to the application object.
    I'm pretty sure the reads will continue to get the old application value
    until you unlock.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net
    Developer for Hire


    "Eidolon" <com> wrote in message
    news:%phx.gbl... 


    Steve Guest

  4. #4

    Default Re: Application.Lock - allows read??

    Sreejumon is a smart guy and made me doubt myself on this one. So I looked
    it up on the Internet and I still can't say I'm sure one way or another. I
    saw a couple web sites that agreed with what Sreejumon pasted, then I also
    saw some sites that did not. And I saw others that weren't specific about
    that detail.
    Here's more info:
    http://www.devguru.com/Technologies/asp/quickref/application_lock.html
    http://webcoder.info/reference/Application.Lock.html
    http://www.piclist.com/techref/language/asp/obj/ref_vbom_apoml.htm

    Has anybody personally tested this situation to be sure?

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net
    Developer for Hire


    "Steve C. Orr, MCSD" <net> wrote in message
    news:%phx.gbl... [/ref]
    it 
    >
    >[/ref]


    Steve Guest

  5. #5

    Default Re: Application.Lock - allows read??

    Steve,

    I just tested it like this:

    If Not IsPostBack Then

    '---First page load only

    Application("Test") = 1

    Response.Write(Application("Test").ToString)

    Else

    '---Post back only

    Application.Lock()

    Application("Test") = 2

    Response.Write(Application("Test").ToString)

    End If

    The application object is still readable (of course) and on post back it
    returned as: 2



    Sincerely,


    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzche


    "Steve C. Orr, MCSD" <net> wrote in message
    news:phx.gbl... 
    looked 
    I [/ref]
    to [/ref][/ref]
    does 
    > >
    > >[/ref]
    >
    >[/ref]


    S. Guest

Similar Threads

  1. Read-Only lock upon check in?
    By ng30345 in forum Macromedia Contribute General Discussion
    Replies: 1
    Last Post: February 24th, 05:35 PM
  2. File system get auto change from read-write to read-oly
    By RC in forum Linux / Unix Administration
    Replies: 1
    Last Post: October 23rd, 10:51 PM
  3. Replies: 2
    Last Post: August 9th, 08:52 PM
  4. When to lock application object
    By Ron Vecchi in forum ASP.NET General
    Replies: 3
    Last Post: July 26th, 10:31 PM
  5. Replies: 2
    Last Post: July 21st, 05:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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