开发者

ASP.NET publish: old DLL is not overwritten, and comes back

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 a开发者_如何转开发pplication 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?


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.


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


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜