SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question global.asa questions

    does the global.asa offer any benefits (security, speed, etc) of putting your connection string in it as opposed to having your connection string in an include file with an extension of .asp?

  2. #2
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In theory, yes. Stick the connection string in an application variable within the Application_OnStart() sub and it will only be initialised once, as compared to being set every time the include script is executed.

    In real terms, the difference in speeds will be negligible for a single application variable.

    If you are setting 1000 application variables in an include script then there clearly [u]will[u/] be a significant speed improvement when they are moved to global.asa as described above, since they will only be set once.

    Whether or not any of this is at all applicable depends on your code/site needs!


    M@rco

  3. #3
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In fact, the best approach is to find out! Create two versions of your scripts - one as-is, and one with the application variable initialisations in the global.asa.

    Then stress-test with a suitable tool (e.g. Microsoft's WAST) from a computer on the network (don't run it from the server itself).


    M@rco


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
  •