开发者

ASP.NET Writing to the Bin directory, access denied when anonymous user

开发者 https://www.devze.com 2022-12-25 23:24 出处:网络
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 wh

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号