When I rebuild a project on my dev server and copy over the application .dll and web forms (vb and aspx) files, the session variables on the live server are lost. Can anybody explain why this happens?
This conversation is currently closed to new comments.
I don't actually program in ASP, but you may want to try the following standard housekeeping tasks because they can often fix problems that are apparently unrelated: -Make sure you've downloaded and installed all updates on your operating system. -Run a thorough virus scan. If you don't have antivirus software, you can get a free scan at www.antivirus.com. -Check your computer for spyware. There's a free tool called SpyBot that available at Download.com. Download that and run it.
OK - the ASP.NET is all using code behind which is mostly VB.NET (very similar to VB except enhanced OO capability as you probably know)
No matter what you program the code behind in it all eventually gets compiled down to Microsofts 'super duper' Common Language Runtime when a project is 'built/rebuilt'.
Each web app contains DLLs which are compiled (not like COM btw) as above. If I deploy an altered code behind page to the live environment then it will have no effect as it needs the corrosponding (and updated) DLL to work. Its when I replace the application DLL that the sessions are lost.
Its not impossible that there may be a virus etc. but I am 99.9% certain that this is not the cause as the same occurs on three other servers.
Nope, none of these are the answer. The 'superdumb' asp.net by superdumb Microsoft has this supper dumb feature that allows you to run session state 'In-Process', or 'Out-of-Process'. When you republish the core .dlls the appdomain that the app is running in is gradually shut down, and a new appdomain handles all new requests. This is the restart process. When you run 'In Process' - the session state is stored in the appdomain and is lost when it is shut down. When you run 'Out-of-Process' the session state is not lost. You have two options to run 'Out-of-Process'. The easy one is to use 'StateServer' which is a service that can be installed on the machine. You just change the web.config settings and away you go. The harder option is to use SQL-server - but that gives you the option to do cluserting. Either 'Out-of-process' option works in a WebFarm.
For future reference - you ought to get the .Net SDK from microsoft. You can find this information 5 clicks in. This way you don't have to read 'super-dumb' answers.
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
ASP.NET Application DLL deployment
When I rebuild a project on my dev server and copy over the application .dll and web forms (vb and aspx) files, the session variables on the live server are lost. Can anybody explain why this happens?