开发者

Write files without write permission via ASP.Net

开发者 https://www.devze.com 2023-01-19 18:45 出处:网络
I have created an ASP.Net application using .Net framework 4.0. I need to save an xml file on any location on same server (if file not already exists) and want to access then after always. But I dont

I have created an ASP.Net application using .Net framework 4.0. I need to save an xml file on any location on same server (if file not already exists) and want to access then after always. But I dont want to set write permission to any folder.

Is it possible to write a file to any location for Network service account without specifying write permission?

Does Network service account have default write permission to any location?

Tha开发者_如何学JAVAnks, Jitendra Biyani


You should always be able to write to %TEMP%. (Call Path.GetTempPath())

However, you should not be writing files to disk if you can avoid it.
What are you trying to do?


Typically if I ever need to do something like this I run an application under a domain user account and grant permissions to the output folder just for that particular user.

0

精彩评论

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