Writing to xml file, access denied

Discussion in 'ASP.NET / ASP.NET Core' started by jpopesku, Aug 4, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hey all. I'm attempting to create a (or rather tweak someone else's) guestbook that uses xml. I have everything working nicely except for when I try to post a new entry. Reading from the file is not a problem, but writing is. The error is:
     
  2. I believe if you are using www.discountasp.com to host
    your site where you are writing this script it will be
    necessary to have the xml file stored in one of your
    directories. Since you are writing server-side scripts
    they only have access to files on your server; in this
    case the files hosted by discountasp. To access files
    from another source you need a client-side component.

    [8]

    Owen
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    Create a support ticket, we can double check permission for you.

    Permission can get screw up if you have frontpage extension enabled.

    quote:Originally posted by infinitedes

    I believe if you are using www.discountasp.com to host
    your site where you are writing this script it will be
    necessary to have the xml file stored in one of your
    directories. Since you are writing server-side scripts
    they only have access to files on your server; in this
    case the files hosted by discountasp. To access files
    from another source you need a client-side component.

    [8]

    Owen
    </blockquote id="quote"></font id="quote">
     
  4. Owen: thanks for the reply, but the file is on the server (hence the call to the Server.MapPath() method). The file seems to have read-only access in the directory that it's in on the DASP server (I can view the file's contents via ASP.NET) but doesn't seem to have write-access (I can't change the contents via ASP.NET).
    Is there I folder on the server that I should move the file to in order to have write access to it??

    Thanks,
    JP

    quote:Originally posted by infinitedes

    I believe if you are using www.discountasp.com to host
    your site where you are writing this script it will be
    necessary to have the xml file stored in one of your
    directories. Since you are writing server-side scripts
    they only have access to files on your server; in this
    case the files hosted by discountasp. To access files
    from another source you need a client-side component.

    [8]

    Owen
    </blockquote id="quote"></font id="quote">
     
  5. I think you need a forward slash in front of guesbook.xml or else the path will map to DASP root on the server instead of your application directory + "\Community".
     
  6. In case anyone else is following this thread, contacting support with my problem fixed it. [8D]


    quote:Originally posted by bruce

    Create a support ticket, we can double check permission for you.

    Permission can get screw up if you have frontpage extension enabled.

    quote:Originally posted by infinitedes

    I believe if you are using www.discountasp.com to host
    your site where you are writing this script it will be
    necessary to have the xml file stored in one of your
    directories. Since you are writing server-side scripts
    they only have access to files on your server; in this
    case the files hosted by discountasp. To access files
    from another source you need a client-side component.

    [8]

    Owen
    </blockquote id="quote"></font id="quote">
    </blockquote id="quote"></font id="quote">
     
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