Error 70 : access denied

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shun

    Error 70 : access denied


    Hello,

    Please anybody try to execute this code. I am having a "quick.html " with
    email Id and name etc..., and henext form is the below "gdform.asp ".

    When i try to execute this i am getting the following error. Error 70 :
    Access Denied.

    Please anybody can help me.

    Thanks in advance.
    <%



    Dim landing_page, host_url
    Dim fso, outfile, filename, dirname, myFolder
    Dim req_method, key, value1
    Dim bErr, errStr, bEmpty
    On Error resume next
    bErr = false
    bEmpty = true
    errStr = ""
    Set fso = Server.CreateOb ject("Scripting .FileSystemObje ct")

    host_url = Request.ServerV ariables("HTTP_ HOST")
    response.write( host_url)

    req_method = Request.ServerV ariables("REQUE ST_METHOD")
    dtNow = Now()
    filename = Server.MapPath( "ssfm")
    dirname = filename
    filename = filename & "\gdform_" & DatePart("M", dtNow) & DatePart("D",
    dtNow) & DatePart("YYYY" , dtNow) & DatePart("N", dtNow) & DatePart("S",
    dtNow)

    response.write( req_method)
    response.write( dtnow)
    response.write( filename)
    response.write( dirname)

    sub FormatVariableL ine(byval var_name, byVal var_value)
    Dim tmpStr
    tmpStr = tmpStr & "<GDFORM_VARIAB LE NAME=" & var_name & " START>" & vbCRLF
    tmpStr = tmpStr & var_value & vbCRLF
    tmpStr = tmpStr & "<GDFORM_VARIAB LE NAME=" & var_name & " END>"
    FormatVariableL ine = tmpStr
    end sub

    Sub OutputLine(byVa l line)
    outfile.WriteLi ne(line)
    end sub

    if err.number = 0 then
    response.Write( "<brError :" & err.number &"::"&err.descr iption & filename)
    Set outfile = fso.CreateTextF ile(filename, true)
    response.Write( filename)
    if err.number <0 then
    bErr = true
    response.Write( "<brError :" & err.number &"::"&err.descr iption)
    errStr = "Error creating file! Directory may not be writable or may not
    exist.<br>Unabl e to process request."
    else
    response.write( "gaffar")
    if(req_method = "GET") then
    for each Item in request.QuerySt ring
    if item <"" then
    bEmpty = false
    key = item
    value1 = Request.QuerySt ring(item)
    if(lcase(key) = "redirect") then
    landing_page = value1
    else
    line = FormatVariableL ine(key, value1)
    Call OutputLine(line )
    end if
    end if
    next
    elseif (req_method = "POST") then
    for each Item in request.form
    if item <"" then
    bEmpty = false
    key = item
    value1 = Request.form(it em)
    if(lcase(key) = "redirect") then
    landing_page = value1
    else
    line = FormatVariableL ine(key, value1)
    Call OutputLine(line )
    end if
    end if
    next
    end if
    outfile.close
    end if
    if(bEmpty = true) AND errStr = "" then
    bErr = true
    errStr = errStr & "<br>No variables sent to form! Unable to process
    request."
    end if
    if(bErr = false) then
    if (landing_page <"") then
    response.Redire ct "http://" & host_url & "/" & landing_page
    else
    response.Redire ct "http://" & host_url
    end if
    else
    Response.Write errStr
    end if
    set fso = nothing
    else
    Response.Write " An Error Occurred creating mail message. Unable to
    process form request at this time."
    end if
    %>


  • Dave Anderson

    #2
    Re: Error 70 : access denied

    Shun wrote:
    When i try to execute this i am getting the following error.
    Error 70 : Access Denied.
    You don't state which line the error occurs on, so I will guess. It has to
    be one of these:
    Set fso = Server.CreateOb ject("Scripting .FileSystemObje ct")
    filename = Server.MapPath( "ssfm")
    outfile.WriteLi ne(line)
    Set outfile = fso.CreateTextF ile(filename, true)
    outfile.close
    In all likelihood, you need to grant some file-level permissions to your
    SYSTEM or IUSR_xxx account.



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms.


    Comment

    Working...