we have a strange problem, probably you can give me a Hint, because I've never seen something like this. We're using a WebApplication, where the Users log in with WIF. The problem looks like this:
- User 1 uploads File1 with a self-created Upload-Control --> Works
- User 2 uploads File2 with the same Control --> Upload fails after the File is uploaded, File2 stays in the Upload-Folder
- User 3 uploads File3, but the UploadControl uses the Filename of User 2 --> Ooops
This means user 3 uploads File2, since this is still in the Upload-Folder and anyhow, the user3-Session knows the Filename of User 2.
My question: How is this possible: It seems like each user has his Unique Session ID, and as far as I know the HTTPContext lives only for the Request-Time, and we get the FileName from there.
It seems like this problem wasn't there since the beginning of the Control-usage, so I guess there is a Environment-change?
Thanks in advance
Edit: I did as Kununk said and use Sessions instead of Applications, but it seems like on some HttpContext.Current.Session is null.
I checked the What should I do if the current ASP.NET session is null? and implemented IRequiresSessionState on our IHttpHandler, but it does not work still. Furthermore I implemented the AcquireRequestState-Event and this is called for sure.
Is there any other possibility why the Session is null?