Problem with Scripting.FileSystemObject

Results 1 to 2 of 2

Thread: Problem with Scripting.FileSystemObject

  1. #1
    Join Date
    Dec 1969

    Default Problem with Scripting.FileSystemObject

    Hello,<BR><BR>I have created an asp module where i am writing to a text file. The <BR>syntax used is :<BR><BR>Set FileObj=CreateObject("Scripting.FileSystemObject") <BR>Set File = FileObj.CreateTextFile(FileName, True)<BR>Details = Request.Form("Details")<BR>File.Write(projDetails) <BR>File.Close<BR>Set FileObj = Nothing<BR>Set ResumeFile = Nothing<BR><BR>The variable FileName contains the correct filePath and the value is <BR>obteained as follows.<BR>rootPath= Request.ServerVariables("APPL_PHYSICAL_PATH")<BR>F ileName = rootPath & "temp est.txt"<BR><BR>It works fine on my local server. but when i try running the script on <BR>the internet, i get an error :-<BR>Permission Denied<BR><BR>I am not able to understand why i am getting the permission denied <BR>message, since, i was able to create the temp directory (under which i <BR>am creating my text file) on my internet website where i am assured of <BR>full access to my files by the webmaster.<BR><BR><BR>I have also tried using <BR><BR>Set FileObj=Server.CreateObject("Scripting.FileSystemO bject")<BR><BR>but I get the error<BR><BR>Server.CreateObject failed<BR><BR>Any help appreciated.<BR><BR>Thanks in advance,<BR>Hitesh Kapadia

  2. #2
    Alejandro Mezcua Guest

    Default RE: Problem with Scripting.FileSystemObject

    Hi, check the permissions of the ASP user of your web (normally IWAM_[User]).<BR><BR>This user needs read access to (at least) the scripting DLL (normally C:WINNTSystem32scrrun.dll).<BR><BR>If the user doesn&#039t have access to this file it wont be able to instantiate the object.<BR><BR>Hope it helps<BR><BR>Alejandro Mezcua<BR><BR>-------------------------------------<BR>Zaltor Soluciones Informáticas<BR>Microsoft Certified Solution Provider<BR><BR>C/Caleruega 67<BR>28033 Madrid (Spain)<BR><BR>Web:<BR>e-mail:<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