Application variables vs Dictionary objet

Results 1 to 2 of 2

Thread: Application variables vs Dictionary objet

  1. #1
    Carlos Baez Guest

    Default Application variables vs Dictionary objet

    Hello,<BR>I am writing a web site that reads some information in the database when starting and keeps the data in application variables. Things like colors, some titles,... This way the whole site can be changed easily.<BR>I am wondering if for performance reasons I should use a dictionary object instead of reading Application("var") all the time.<BR>Thanks,<BR>Carlos Baez

  2. #2
    Sam Otto Guest

    Default RE: Application variables vs Dictionary objet

    I would vote for not using the dictionary object and keeping them in the Application object directly.<BR>1) It&#039s basically in a dictionary anyway and just saves you a level of indirection<BR>2) I&#039ve ready stuff about how its bad to keep a Dictionary in an Application or Session Object because it isn&#039t thread safe and, depending on your IIS set up you could get in trouble. I don&#039t know all the details of this one but there is some registry entry about threads that affects objects....

Posting Permissions

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