So I was using the Path.GetTempFileName() function to generate a temp file for writing to before moving to the webserver. Works fine locally because I have permissions to the temp directory but when published the webserver blocks or have very restrictive permissions to its temp directory. Sure its a security reason but question: what would be a good alternative for generating temp files on the server that customers using the website would have read/write access to?

Im thinking that generating a guid in a folder they should have access too should help eliminate any naming collisions of the file name as an initial workaround.

Any issues with that or better solutions?

Thansk