开发者

modify content of xml file from published code

开发者 https://www.devze.com 2023-01-12 14:20 出处:网络
I am trying to modify an xml file from my aspx code. The file is in another directory from my project like in D:\\folder\\fi开发者_如何学Pythonle.xml When publishing my code and running it I am receiv

I am trying to modify an xml file from my aspx code. The file is in another directory from my project like in D:\folder\fi开发者_如何学Pythonle.xml When publishing my code and running it I am receiving an error as not to be able to access this directory, access in denied. Which user account shall I add to this folder in security option to be able to modify it. I tried adding IIS user but it does not seem to work. Any other workaround this ?


Check which identity that's associated with the application pool, and grant that user access to the folder.

You didn't specify which version of IIS you're using, but here's a decent article on how application pools work


I solved the issue finally.. In my pc I am using Win Xp and had to grant ASP.NET machine account user appropriate rights on the file while on the server that i am finally publishing the code I am using Windows Web Server 2008 and the matching ASP.NET Machine Account was Network Service i granted the same rights here and now i can modify the file successfully. I am using IIS 7.5 on this machine.

I think your approach Tchami has the same idea. So I am marking it as the answer :) Thank you

0

精彩评论

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