I have a .NET app that allows users to upload images to a directory within the webapp and then view them. The problem is that the session gets lost when I upload or delete an image in the webapp directory. It seems that the app pool is getting recycled when I add images, and not just config or cs files.
I have seen this technique used in so many tutorials that I wonder if it does actually work with the right server settings, or if it is a completely flawed technique.
If I add an image to a subdirectory manually, or delete it manually, the session remains. If I add the image to a subdirectory through visual studio the session remains, but if I delete it through visual studio, the session is lost.
If I upload the images to a folder outside of the webapp then I can't show them in img tags.
I'd be interested to hear what you might do as a workaround.