Problems creating a temp file in a directory with

Results 1 to 2 of 2

Thread: Problems creating a temp file in a directory with

  1. #1
    Join Date
    Dec 1969

    Default Problems creating a temp file in a directory with

    I need to create temporary file from variables and change one line in a batch file. This batch file becomes a link and opens a PDF document with pre-populated fields. When I try and create the temp file, I get an error "Access Denied". I do not want to open the permisions on the directory. The following is the code:<BR><BR><BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062;<BR>SUB Application_OnStart<BR> <BR>Set FileObject = Server.CreateObject("Scripting.FileSystemObject")< BR>Set Out= FileObject.CreateTextFile (Application("FDFFilename"), TRUE, FALSE)<BR>Out.WriteLine("Testing")<BR>END SUB<BR>&#060;/SCRIPT&#062;<BR><BR>Any help would be greatly appreciated. Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Problems creating a temp file in a directory w

    Ummm...and just WHERE does the value of Application("FDFFileName") get initialized?<BR><BR>Since this is the Application_onStart code, it had *better* be initialized before you get to the line where you try to use it to create a file. But you don&#039t show any such initialization.<BR><BR>If it isn&#039t initialized, then you just tried to create a file with "" for the file name. Well, wonder permission was denied.<BR><BR>And if it is initialized...and if you *are* specifying the correct directory path to the file...then how can you expect to be able to create a file in a directory if you don&#039t "open up" the directory to such operations??? <BR><BR>

Posting Permissions

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