Creating multiple files

Results 1 to 2 of 2

Thread: Creating multiple files

  1. #1
    Vijay Guest

    Default Creating multiple files

    hi,<BR>I have a small ASP application that builds two files(using FileSystemObject) on the fly based on the user input. The user is then redirected to a framed page which essentially contains the newly created files. <BR>Here is the code...<BR>&#060;%<BR> var fso, f1, f2;<BR> fso = new ActiveXObject("Scripting.FileSystemObject");<BR> f1 = fso.OpenTextFile("C:\Inetpub\wwwroot\test\hdr.asp" , 2, true);<BR> f1.Write(header);<BR> f1.close();<BR> f2 = fso.OpenTextFile("C:\Inetpub\wwwroot\test\body.asp ", 2, true);<BR> f2.Write(footer);<BR> f2.close();<BR> Response.Redirect("newpage.asp");<BR>%&#062;<BR>No w when multiple users use this application at the same time, the framed page reflects the latest created file giving incorrect response to the user. Now my question is that, is it possible to run this piece of code in a synchronized fashion.. i mean only one user should be able to run this piece of code at a given time. <BR>If you have any other suggestions for solving this problem, they are welcome. <BR>Thanks very much for your help,<BR>-Vijay

  2. #2
    Anton Bawab Guest

    Default RE: Creating multiple files

    I don&#039t know how much user input goes into building your pages, but you could try writing them directly using the RESPONSE.WRITE and avoid saving them in the first place while making sure every user gets what she/he asked for.<BR><BR>AB.

Posting Permissions

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