51 users online (1 members and 50 guests)  


  Results 1 to 3 of 3

Related

  1. Replies: 1
  2. #1044 - Access denied for user    Forum: PHP Forum
    Replies: 0
  3. Replies: 2
  1. #1
    Blelisa's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Feb 2004
    Posts
    26

    Permission Denied.........

    Hello all,

    Can anyone see what I am going wrong? I have contacted my web hoster and they insist all files are Readable/Writable, yet I am still getting this error whenever I try to enter info into my form.:

    Microsoft VBScript runtime error '800a0046'

    Permission denied

    /license_action.asp, line 7


    Here is my code for my form:
    Code:
    <html>
    <head>
    <title>Form for License Generator</title>
    </head>
    <body>
    <form name="license_input" method="post" action="license_action.asp">
    Temp ID<input name="tempid" type="textarea"></br>
    encyyMessage<input name="encmsg" type="textarea"></br>
    start_date<input name="stdate" type="textarea"></br>
    genac<input name="genac" type="textarea"></br>
    genac_exp_date<input name="genexpdate" type="textarea"></br>
    genac_access<input name="genaccess" type="textarea"></br>
    bldc<input name="bldc" type="textarea"></br>
    bldc_exp_date<input name="bldcexpdate" type="textarea"></br>
    bldc_access<input name="bldcaccess" type="textarea"></br>
    bcpm<input name="bcpm" type="textarea"></br>
    bcpm_exp_date<input name="bcpmexpdate" type="textarea"></br>
    bcpm_access<input name="bcpmaccess" type="textarea"></br>
    indu<input name="indu" type="textarea"></br>
    indu_exp_date<input name="induexpdate" type="textarea"></br>
    indu_access<input name="induaccess" type="textarea"></br>
    <input type="submit" name="cmdsubmit" value="Submit">
    </form>
    </body>
    </html>
    Here is my code for my license_action where the error originates from
    Code:
    <%
    
    Dim fso
    Dim tst
    
    Set fso=Server.CreateObject("Scripting.FileSystemObject")
    Set tst=fso.OpenTextFile("D:\data\websites\clients\magneforcess\reading.txt", 2, true)
    
    tst.writeline "temporary id = " & Request.Form("tempid")
    tst.writeline "encyyMessage = " & Request.Form("encmsg")
    tst.writeline "start_date = " & Request.Form("stdate")
    tst.writeline "genac = " & Request.Form("genac")
    tst.writeline "genac_exp_date = " & Request.Form("genexpdate")
    tst.writeline "genac_access = " & Request.Form("genaccess")
    tst.writeline "bldc = " & Request.Form("bldc")
    tst.writeline "bldc_exp_date = " & Request.Form("bldcexpdate")
    tst.writeline "bldc_access = " & Request.Form("bldcaccess")
    tst.writeline "bcpm = " & Request.Form("bcpm")
    tst.writeline "bcpm_exp_date = " & Request.Form("bcpmexpdate")
    tst.writeline "bcpm_access = " & Request.Form("bcpmaccess")
    tst.writeline "indu = " & Request.Form("indu")
    tst.writeline "indu_exp_date = " & Request.Form("induexpdate")
    tst.writeline "indu_access = " & Request.Form("induaccess")
    
    tst.close
    Set tst = Nothing
    Set fso = Nothing
    
    
     if err<>0 then 
        Response.Write(Err.Description) 
      else 
        response.redirect("http://WWW.U2.COM") 
    end if
    
    %>
    This is just driving me crazy!

  2. #2
    DeadMeatGF's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    381

    Re: Permission Denied.........

    I'm not an ASP person - but the only thing I notice is that when I google the "writeline" syntax it's enclosed in brackets. Worth trying
    Code:
    tst.writeline ("temporary id = " & Request.Form("tempid"))
    just to check.

  3. #3
    yoemanspiffy's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Aug 2006
    Posts
    28

    Re: Permission Denied.........

    1. The FSO does not work properly on non IIS boxes. So if you are on a linux box running asp, stop trying. Run the script below and make sure you are running on IIS and not on apache/linux or some other OS combination.
    2. Next thing to check is that the path you are giving is the actual path to the file. What I have done when experiencing this problem in the past is to make a sample script like the one listed below, put it into the directory with my file that I want to write to and run it via browser. look for the (PATH_TRANSLATED) server variable. Make sure that it is the same up to the actual file name as what you have in your code.
    3. Make sure the directory it is in also has read/write permissions - sometimes host employees are a little daft, and really don't understand this.
    SAMPLE SCRIPT:

    <table border="1">
    <%
    For each item in Request.ServerVariables
    Response.Write("<tr><td>" & item & "</td><td>")
    Response.Write(Request.ServerVariables(item))
    Response.Write("</td></tr>" & vbCrLf)
    Next
    %>
    </table>



Tags for this Thread