Cannot create a new file?

Discussion in 'Getting started' started by BanksySan, Sep 29, 2009.

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

    I've just uploaded my site, it's got an assembly that creates an xml file at:

    .\classes.xml

    When I access the page that invokes the method I get the error:

    Access to the path 'C:\Windows\SysWOW64\inetsrv\classes.xml' is denied.

    Has anyone got any advise?

    Is this an app.config type thing (I assume that the web.config governs the aspx pages bit and the app.config governs the assembly)?
     
  2. Joseph Jun

    Joseph Jun DiscountASP.NET Staff

    Your application's trying to write directly to the IIS directory which wouldn't be permitted.

    Make sure that you're specifying the server path that's available on the Account Information page in your DiscountASP.NET Control Panel.
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    use server.mappath("\classes.xml")
     
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