I am trying to save xml to a certain location like this:
private void UpdateXMLFile(XElement xmlFeed,string xmlFileLocation)
{
xmlFeed.Save(xmlFileLocation);
}
I have added SYSTEM, NETWORK SERVICE and Administrators all with all permissions to the folder I am saving in but I still get this error?
System.UnauthorizedAccessException Access to the path 'c:\temp\myfile.xml' is denied
I am using an asp.net 3.5 application (iis 7) to do this. The identity of the application is the 'ApplicatonPoolIdentity'
you need to add write permissions for user IIS APPPOOL\\[your app pool name] to that folder. This user is created "under the hood" when you create an app pool, and you can find them in your "local users" manager:
In my options there are two possibilities:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.