PDA

View Full Version : Cannot create a new file?


BanksySan
09-29-2009, 04:41 PM
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)?

Joseph Jun
09-29-2009, 07:03 PM
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 (https://my.discountasp.net/account-info.aspx) page in your DiscountASP.NET Control Panel.

bruce
09-30-2009, 10:07 AM
use server.mappath("\classes.xml")