views:

261

answers:

3

Using VS2008sp1, I'm publishing Web app to a separate IIS7.5 server. It's been ok for a while, but hit this strange scenario: -Created a class file that generates its own DLL. -works fine locally -When publish to server, the older DLL file is there along with all the other newer files (based on time stamp). The application dies when it tries to execute the new class method (it knows of the correct method call, but cant find the method. e.g method not found: class.method() ) -turned off IIS service. Deleted DLL file, republished: still showed older DLL (???)

Its obviously cached / protected somewhere, but how do I get around this an publish all as a group? Do I need to restart IIS everytime?

A: 

Delete the Temporary ASP.Net files located in the framework folder on the server relevant to your particular application.

%SystemRoot%\Microsoft.Net\Framework\v\Temporary ASP.Net Files

Joel Etherton
+1  A: 

Usually this is a problem with the difference in the time on your machine and on the server.

If your machine is running ahead by a little bit then visual studio won't overwrite some of the files on the server during a publish.

You're best bet is to delete everything on the server, then publish. Or, get the clocks in sync. However, even then sometimes things like resource files still won't get published correctly.

VS tries to be a little too intelligent here.

Another thing to do is check the "Delete all existing files prior to publish" box if it's available.

Chris Lively
Even though the server and client looked like the same time, they were off by 30-40 seconds. Once I sync'd them, I've not had the issue.
JoeJoe
A: 

If you restart IIs it will clear out any cached DLLs -- this is the best way to insure an install running the newest version. MS Docs say it will reload and run side-by-side, but why not just clear the sucker out?

Hogan