Hi all,
Exsits any way to modify the temporary folder path returned by System.IO.Path.GetTempPath() method?
My asp.net application run under iis 7.
Thanks
Hi all,
Exsits any way to modify the temporary folder path returned by System.IO.Path.GetTempPath() method?
My asp.net application run under iis 7.
Thanks
Presumably, you don't want to change the returned path (value), but change the actual path?
As you can see here, the value returned depends on a number of possible environmental variables. You'd need to change these to change the returned path.
I wonder why you want to change that, as no matter what path it is returned, your application uses it as a temp folder (where the files can be cleaned freely).
If your application does care the existence of the files, write them to your own temp folder, which means you should give up System.IO.Path.GetTempPath(). Many applications, even Microsoft's, use their own temp folders.
I don't think you should change any temp folder environment variables as that will affect other applications unnecessarily (though they should not care if they really treat the folder as a temp folder :)).