What's the usual way of handling temporary user files under ASP.NET running
on IIS? On a normal Windows client program, you'd probably store the
documents in the %TEMP% folder. However, aren't all users running under the
same ASPNET account so they're sharing the same TEMP folder? Also, you
really want them within the web-site folder so that normal HTML <IMG> tags
can be used.
We're using a temporary file to hold a user's photograph. This photograph is
stored in a SQL database as an IMAGE column. When the record is opened, we
need to create the temporary file with the same file name so that if the
user right-clicks, the default file name is correct, i.e. the original.
At the moment, we've created a User folder in the web site and build a
unique path using the session ID like this:
c:\inetpub\wwwroot\ourwebsite\users\37873827387283 \porky.jpg
Where 37873827387283 is the session ID. It works but doesn't feel quite
right :-) We also have to manually grant ASPNET write access to the Users
folder.
Any better ideas?
Thanks, Rob.