views:

32

answers:

2

Hello,

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?

Thanks, Jitendra Biyani

+1  A: 

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?

SLaks
Actually I have to create an xml file, which will contain master data required for my application. Fetching this data from web service requires lot of time and data changes rarely or once in 24 hours. So I want to create a file on disk for that purpose to save the web service call and thus processing time. But I dont want to designate specific folder with "write" permission explicitly. So I need a location where I can save that file without giving "write" permission to that.
Jitendra Biyani
A: 

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.

e36M3