I need to use some folder for temp files. I tried to use
string directoryPath = HttpContext.Current.Server.MapPath("~/tempFiles");
but when I publish it to IIS I had permission issues.
So I tried to use :
string directoryPath = Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData);
It works fine when I run my web application from VS2012, but I get an empty string when I publish it to iis and run it there.
I checked and loadUserProfile is "true".
Any other suggestion?