How to set a temporary path for these two methods?
System.IO.Path.GetTempFileName() System.IO.Path.GetTempPath()
My company’s application was developed for Windows 2008 with .NET 4.0. However, the application will support both Windows 2008 and Azure.
Because Azure does not allow writing to a local file, it is not possible to create a temporary file in Azure. There are many places in the application where the temporary file is used for large jobs (this means that we cannot put data into memory because the temporary file is huge).
My plan is to create a TempFileWrapper to replace the original generation of temporary files. However, if there is simply a way to change the return values from System.IO.Path.GetTempFileName() and System.IO.Path.GetTempPath , this will save my work.
source share