save application values after iis restart

Results 1 to 2 of 2

Thread: save application values after iis restart

  1. #1
    elad rosenberg Guest

    Default save application values after iis restart

    hi all...<BR>i wrote poll/survay scipt in asp.<BR>i want every user will vote and express his opinion in my site.<BR>you can seeit in<BR>i used the application variable to store the pll results.<BR>after i restart my iis all the data is deleted and poll results<BR>are starting from 0 .<BR>how can i save my data even te iis is restart?should i wrote<BR>the rsults to database?<BR>elad<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: save application values after iis restart

    In your Global.asa file under Application_OnEnd have the values of your Application varibles written away to a text file.<BR><BR>Set fs = CreateObject("Scripting.FileSystemObject")<BR>Set MyFile = fs.CreateTextFile("C:Stats.txt")<BR><BR>MyFile.Wri te Application("Votes")<BR><BR>MyFile.close<BR><BR>In your Application_onStart you could have this read back into your Application varible!<BR><BR>Hope That Helps<BR><BR>Pete

Posting Permissions

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