tags:

views:

95

answers:

3

I have a .NET 1.1 Web Application running on a local development machine and the live version is running on a hosted web server running .NET 2.0 (everything runs fine).

My live server has a mirror of the project thats on my local development machine. When i re-build the project/solution and upload the new DLL to the live server, the changes that i have made don't ever take effect on the first upload.

I find i have to

  1. Build the project on dev machine
  2. Navigate to the home page on Dev machine so that the DLL re-compiles
  3. Upload new DLL to live server
  4. Navigate to the home page on live server so that the DLL re-compiles

then repeat steps 2,3 & 4 again and this time round the changes have taken effect.

Any ideas why this is happening as it makes my deployment process a lot longer than it has to be and is very frustrating sometimes i even have to do it three times!

Help is much appreciated.

Note: Im running Studio .NET 2003 on an XP2 windows machine browsing in Firefox 3.0.9.

+1  A: 

If you have remote desktop capabilities, you could try steps 1-4 and recycle the application pool and see if that does resolve the issue

Wayne
Thanks, i will try this next time i upload.
Kevin Dark
This seemed to work. I guess as there are multiple threads in the worker process the older DLL was still in memory. To get an immediate result recycling or refreshing the application pool for that website made the changes take effect.Thanks :)
Kevin Dark
A: 

While I do not understand why a compiled DLL would be "recompiled" by ASP.NET (it should simply be loaded), here are some possibilities to consider (I'll add more as I think about this):

  1. Caching by your browser. In Firefox, you can keep caching turned off, if you have the "Webdeveloper addon".

  2. Corrupted shadow copies of the DLL in the ASP.NET temporary files folder. To solve this, see my answer to this question.

Cerebrus
Thanks for the reply.When i say recompiled i mean the time it takes the app to load on first run after a compile. Its a large-ish DLL (about 2MB) and on first run after compile takes about 30-40 seconds to load, thereafter pages load at a normal rate.1. I dont think it is caching as the changes take immediate effect on my dev server that i navigate to through http://localhost etc.Its only when the DLL gets copied to the live server, its almost like the new DLL was never uploaded first time.
Kevin Dark
2. There is no way i can stop IIS on the live server to upload a change then restart it. Changes are made during the working day and I cannot have ANY down time.
Kevin Dark
A: 

Check the perfmon counters for recompiles. Unless you NGEN, Dropping a new DLL on a website causes pages to be recompiled. There is a setting in web.config that flags whether they're compiled in batch or one at a time. In either case, dropping a new DLL should trigger recompiles of your pages.

Here's something that has bitten me more than once - I make a change, drop it, and hit the site. I don't see the affects of my change, so I do something else to 'fix it' and then refresh my browser window. NOW I see the change! The change was there all along, it was the refresh that 'caused it' to show up.

n8wrl
Kevin Dark