session vs application variable

Results 1 to 2 of 2

Thread: session vs application variable

  1. #1
    Join Date
    Dec 1969

    Default session vs application variable

    Which is better to put a connection sting in? or does it matter?<BR><BR>I&#039;ve seen connection strings defined in the application variable in the global.asa file and wondered if that were a good idea or not. It seems to me that if you wanted to change the variable and went into the global.asa to change it, you&#039;d need to restart your IIS server in order for the changes to take place, because the application variables are simply cashed as what was set that initial time that the server started, correct? If that&#039;s the case doesn&#039;t that make an unnecessary chore for the developer? Wouldn&#039;t it be better to put it in the session variable?<BR><BR>Thanks in advance fellow programmer(s)...

  2. #2
    Join Date
    Dec 1969

    Default RE: session vs application variable

    No point in putting it into a Session variable - you then have it in memory for every visitor.<BR><BR>In the application variable is fine - IIS automatically recognizes changes to the global.asa.<BR><BR>Or, do what I do - just put it into an included file (along with a function to open and return a DB connection).

Posting Permissions

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