Permission error w/ richtext editor

Discussion in 'Classic ASP' started by Jim, May 21, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Jim

    Jim

    I'm using a richtext editor to allow a user to modify blocks of code within his site. I've used this technique before but now I'm getting Permission denied when I try to write the file back to the site? I think the code is good... I've used it on another ISP... The red line is where I'm getting the error.

    Here is the code:

    **********************************************************************
    Dim fs , f , f2, txtData, optTxt, txtRead, fread, gdata, i1,rsSelect
    tfilename = Trim(Request.Form("FileName"))
    ' response.write(" Updated = " & Server.MapPath(tfilename))
    Set fs=Server.CreateObject("Scripting.FileSystemObject")
    If fs.FileExists(tfilename)=false and tfilename <> "" Then
    Set f=fs.CreateTextFile(Server.MapPath(tfilename),true)</font id="red">
    txtData=Trim(Request.Form("text"))
    Session("strData")=txtData
    response.write(txtData)
    f.writeline(txtData)
    f.close
    ' response.write(tfilename & " Updated")
    Set f=Nothing
    Set fs=Nothing
    end if


    *********************************************************************
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Do you have FrontPage extension installed?

    quote:Originally posted by Jim

    I'm using a richtext editor to allow a user to modify blocks of code within his site. I've used this technique before but now I'm getting Permission denied when I try to write the file back to the site? I think the code is good... I've used it on another ISP... The red line is where I'm getting the error.

    Here is the code:

    **********************************************************************
    Dim fs , f , f2, txtData, optTxt, txtRead, fread, gdata, i1,rsSelect
    tfilename = Trim(Request.Form("FileName"))
    ' response.write(" Updated = " & Server.MapPath(tfilename))
    Set fs=Server.CreateObject("Scripting.FileSystemObject")
    If fs.FileExists(tfilename)=false and tfilename <> "" Then
    Set f=fs.CreateTextFile(Server.MapPath(tfilename),true)</font id="red">
    txtData=Trim(Request.Form("text"))
    Session("strData")=txtData
    response.write(txtData)
    f.writeline(txtData)
    f.close
    ' response.write(tfilename & " Updated")
    Set f=Nothing
    Set fs=Nothing
    end if


    *********************************************************************
    </blockquote id="quote"></font id="quote">
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    Ya... this is a revolving topic that'll never go away until the next version of FP extension.

    We'll be releasing a new feature that allow you to control the permission on the folder. That will probably fix a lot of these problem.


    quote:Originally posted by eurovw

    I had the same problem when I tried to upload a picture thru the web form. I had FP extensions installed. When I uninstalled them, everything started to work.

    </blockquote id="quote"></font id="quote">
     
  4. I had the same problem when I tried to upload a picture thru the web form. I had FP extensions installed. When I uninstalled them, everything started to work.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page