dontberude
dontberude

Reputation: 551

Accessing folders ouside of root IIS

I need to write files into a folder using c# that is outside of root folder on IIS 7.

I have made the folder and given IIS_IUSRS and the app pool users all rights on the folder but I always get UnauthorizedAccessException when I try to write to it.

Everything I googled says the solution is virtual directory, but I cant have the folder emptied every time I publish the web.

Is there a solution to this?

Upvotes: 1

Views: 538

Answers (1)

S.Dav
S.Dav

Reputation: 2466

You also need to grant file access permissions to the NETWORK SERVICE account.

Upvotes: 1

Related Questions