Is there a place in the ASP.NET program where I can write temporary files?

Is there a place in ASP.NET where can I write temporary files? Assuming IIS is installed by default, does the program work under an anonymous user?

thank

+3
source share
3 answers

You can pretty much save temporary files anywhere on disk if you have permissions. You just need to make sure the files are uniquely named for the anonymous user.

Ideally, having a dedicated “temporary” folder is a good idea where these files will be periodically deleted or cleaned up.

+2
source

(, , ) System.IO.Path.GetTempPath(). , .NET , GetTempFileName() System.IO.Path

0

There is no built-in mechanism for asp.net

What you can do is create one of your root applications and use it for temporary operations like this.

string tempPath = Server.MapPath("~\\temp");
0
source

Source: https://habr.com/ru/post/1739962/


All Articles