G
Guest
Hi,
I've been using
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) to get
the application data folder for ASP.Net applications using IIS5.0 where it
works for both the ASPNet machine account and for a different account if i
configure the ASP.Net process to run as an alternative account by altering
the machine.config file. It gives me back
C:\Documents and Settings\myuser\Application Data where i'm using a local
user called myuser as the ASP.Net process account.
When i tried the same on a IIS6.0 box by using the default application pool
which is configured to use the NetwrokService user, or if i configure it to
use a different account i keep getting an empty string back which the SDK
gives the following explanation for
The path to the specified system special folder, if that folder physically
exists on your computer; otherwise, the empty string ("").
A folder will not physically exist if the operating system did not create
it, the existing folder was deleted, or the folder is a virtual directory,
such as My Computer, which does not correspond to a physical path.
If anyone can explain why this is so i would appreciate it, I need to be
able to create folders and files at such a location where i would prefer not
to use isolated storage and since i cannot write to the CommonApplicationData
specila folder without granting specific permissions i would prefer to use
the ApplicationData special folder.
Thanks in advance
Pat
I've been using
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) to get
the application data folder for ASP.Net applications using IIS5.0 where it
works for both the ASPNet machine account and for a different account if i
configure the ASP.Net process to run as an alternative account by altering
the machine.config file. It gives me back
C:\Documents and Settings\myuser\Application Data where i'm using a local
user called myuser as the ASP.Net process account.
When i tried the same on a IIS6.0 box by using the default application pool
which is configured to use the NetwrokService user, or if i configure it to
use a different account i keep getting an empty string back which the SDK
gives the following explanation for
The path to the specified system special folder, if that folder physically
exists on your computer; otherwise, the empty string ("").
A folder will not physically exist if the operating system did not create
it, the existing folder was deleted, or the folder is a virtual directory,
such as My Computer, which does not correspond to a physical path.
If anyone can explain why this is so i would appreciate it, I need to be
able to create folders and files at such a location where i would prefer not
to use isolated storage and since i cannot write to the CommonApplicationData
specila folder without granting specific permissions i would prefer to use
the ApplicationData special folder.
Thanks in advance
Pat