Question

Im creating files from a sharepoint project on C drive in a particular folder. I have added the following permission rights to that folder, the code works fine and write files on specified folder. But when I deployed the same project on server and doing the same job the error occurs "Access is denied to the path C:\AR\downloadedFiles". Googled a lot but found the reason of permissions.. which i have already given.

Users to which permissions are given:

EveryOne, IUSR, INTERACTIVE, ADMINISTRATOR, SYSTEM, NETWORK ,NETWORK SERVICES, LOCAL SERVICES

Need for help

Was it helpful?

Solution 2

SPSecurity.RunWithElevatedPrivileges(delegate(){}); worked but not resolved my problem completely. I was accessing a folder in C: drive through sharepoint that was making problem. Now i am accessing a user temp folder with SPSecurity.RunWithElevatedPrivileges that works fine.

Thanx for help :)

OTHER TIPS

have you tried using:

SPSecurity.RunWithElevatedPrivileges(delegate()
{
    //Code used to write to file system goes here
});

This basically elevates the permission of the current user to the account that is running the application pool

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top