ASP.NET Writing to the Bin directory, access denied when anonymous user
I have a pr开发者_C百科ogram that creates a small file in the Bin directory for the purpose of tracking a license (that's the intention), all works fine when debugging but I've just realized that when I run it on a IIS server under the anonymous user account (IUSR) the file isn't created as IUSR only has read permission (I know this is correct but drat!).
Can I write to another location under IUSR account or can I run my code under 'Local Service' account?
Thanks
Unless you're impersonating the user, the saving operation is performed with the Application Pool account.
Not sure which IIS you're using but (at least on IIS 6.0), by default, application pools run under the Network Service
account so you would need to give write permissions on that folder to that account.
精彩评论