ApplicationData folder and IIS6.0

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
 
G

Guest

I forgot to say i did log the new app pool identitiy user in on the IIS6.0
machine so the profile and therefore the ApplicationData folder exist on the
machine.

Pat
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top