Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shadow copy in mvc core

In Asp.Net Shadow copying enables assemblies that are used in an application domain to be updated without unloading the application domain. Since Mvc Core not support AppDomain and can not load duplicate different version of assembly. I'm looking for a way to update the assemblies at runtime without unload or stop site. My goal is to update the site with a new version if available on remote server.

like image 874
alireza.salemian Avatar asked Jun 21 '17 22:06

alireza.salemian


People also ask

What is Shadow copying in ASP NET?

Shadow Copying Assemblies. Shadow copying enables assemblies that are used in an application domain to be updated without unloading the application domain. This is particularly useful for applications that must be available continuously, such as ASP.NET sites. Shadow copying is not supported in Windows 8.x Store apps.

How do I create a shadow copy of a task?

From a SERVER OS (not Windows 10) you can follow these steps: 1 Open Computer Management. 2 "Connect to another computer" (your Core server) 3 Expand System Tools 4 Right-click S hared Folders > click All Tasks > and click Configure Shadow Copies. More ...

How to create shadow copies on Server Core?

To create shadow copies for computers with a Server Core installation, you need to manage this feature remotely from another computer. If easy's out of the question... see this thread, where they try go at it the hard way. I love to automate things, but in this case, I think it's much more effort than just using the GUI initially.

What is Shadow Copy in Windows 10?

Shadow Copy is a technology included in Microsoft Windows, also known as Volume Shadow Copy Service, Volume Snapshot Service or VSS. With this technology, you can create backup snapshots or copies of computer volumes/files whether you are in use or not. In order to create/restore shadow copies, file system type of NTFS is needed.


1 Answers

You can find a workaround here: The site DLL seems to be intermittently locked when publishing. The trick consists of creating a subdirectory (eg. /PREVIOUS), move the 'old' files in that directory, change the web.config to point to the exe in that directory, publish the new site and change the web.config again. Of course, this should be scripted... If you have set 'Remove additional files at destination' you cannot work with a subdirectory, but you can put that directory elsewhere of course (as long as IIS has access to it).

like image 109
David Urting Avatar answered Sep 29 '22 16:09

David Urting