Session variable disapearing
-
I was working on a ASP.NET project in school. We had a problem that seemed just impossible to solve. We stored an item in a session variable. Buth when certain activities were made to the database, the session variable was empty, for no good reason it seemed. One of the other members of my group spent a lot of time on the problem and discovered that the problem seemed to go away if the access database was moved from the projects bin folder to another place. I remember I had this problem earlier, but then I wasn't working with an access database but xml files. They were placed in the projects bin folder. So the problem seems to be with having files that are being updated in the bin folder. So is there a problem with putting files that changes in the bin folder? An idea might be that ASP.NET recompiles everytime something in the bin folder is changed.
-
I was working on a ASP.NET project in school. We had a problem that seemed just impossible to solve. We stored an item in a session variable. Buth when certain activities were made to the database, the session variable was empty, for no good reason it seemed. One of the other members of my group spent a lot of time on the problem and discovered that the problem seemed to go away if the access database was moved from the projects bin folder to another place. I remember I had this problem earlier, but then I wasn't working with an access database but xml files. They were placed in the projects bin folder. So the problem seems to be with having files that are being updated in the bin folder. So is there a problem with putting files that changes in the bin folder? An idea might be that ASP.NET recompiles everytime something in the bin folder is changed.
You anwsered you're own question. ASP.NET stops the application (and with that dumps all sessions) when files in the bin folder are changed. This is because ASP.NET expects an assembly (dll) to be changed and wants to recompile the application. Same happens when you change web.config or Global.asax. You should use your bin folder only for dll files.