Questions tagged [shadow-copy]

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.

From MSDN

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.

The common language runtime locks an assembly file when the assembly is loaded, so the file cannot be updated until the assembly is unloaded. The only way to unload an assembly from an application domain is by unloading the application domain, so under normal circumstances, an assembly cannot be updated on disk until all the application domains that are using it have been unloaded.

When an application domain is configured to shadow copy files, assemblies from the application path are copied to another location and loaded from that location. The copy is locked, but the original assembly file is unlocked and can be updated.

89 questions
2
votes
1 answer

AppDomain Shadow Copy Include referenced assemblies

I am trying Shadow Copy for the fist time. I have the following code: static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { var…
ErocM
  • 4,505
  • 24
  • 94
  • 161
2
votes
1 answer

C# - Volume Shadow Copy Alternatives for Backup?

I implemented a RAMDisk into my C# application, and everything is going great, except I need to back up the contents regularly due to it being volatile. I have been battling with AlphaVSS for Shadow Copy backups for a week, then someone informed me…
user470760
2
votes
3 answers

Initialization failure when querying WMI-class Win32_ShadowCopy

while programming throughout the years I have never posted a question on this website, but I have encounted numerous of problems that had been addressed here before. Now, however, I encountered a problem that I can't seem to find an answer to. I am…
Simon
  • 871
  • 1
  • 11
  • 23
2
votes
1 answer

CreateFile returns ERROR_ACCESS_DENIED despite FILE_FLAG_BACKUP_SEMANTICS

I am developing a Windows backup application (mixed Go / C++) that needs to backup files from the disk. My application runs as a user in the "Backup Operators" group, and also with "Back up files and directories" explicitly enabled in…
mappu
  • 329
  • 2
  • 16
2
votes
3 answers

Javascript push into array without reference

This is super frustrating to me so I hope someone can help. The below is a small example to illustrate my problem. var group = { names: [] } var groupList = { group: [], activity:[] } $(document).ready(function(){ …
user1854438
  • 1,784
  • 6
  • 24
  • 30
2
votes
0 answers

Deleting Shadow copy dll from temp directory

Many of our exe's dynamically load B.dll. B.dll makes a copy of itself in a temp file and reloads %TMP%\B-.dll. I'm trying to use this code to mark B-.dll for delete, but it fails with "access is denied", no doubt because of the LoadLibrary call: …
Dave C
  • 1,572
  • 4
  • 23
  • 34
2
votes
2 answers

stdClass object and Shadow Copy strange output

I have following stdClass object and its assignment using reference object. But once after unsetting unset($A); still $B outputs the previous values of $A even a New value is assigned to $A's ->foo property. See the trace below.
Smile
  • 2,770
  • 4
  • 35
  • 57
1
vote
2 answers

AppDomain ExecuteAssembly Could not load file or assembly

I have an app (app1) that loads another app (app2) like this: this._appDomain.ExecuteAssembly(assemblyName); I'm getting this error when that line executes: Could not load file or assembly Foo... App2 has a reference to Foo. If I add a reference to…
Bob Horn
  • 33,387
  • 34
  • 113
  • 219
1
vote
2 answers

Converting a C++ .exe project to a dll

Microsoft provides the source code of vshadow to manipulate VSS (Volume Shadow Service [shadow copy]), and I've modified it a bit but I want to make it into a dll so I can use it in my C# projects. I don't know exactly how to go about doing that,…
Malfist
  • 31,179
  • 61
  • 182
  • 269
1
vote
1 answer

Microsoft VSHADOW.EXE shadow copies contain locked files?

I've been writing a backup program using VSS and started out with VSHADOW.EXE from the Windows SDK 6.1 Samples. It generally works, but I was astonished to see that certain files are still locked inside the shadow copies it creates, such as…
1
vote
1 answer

IIS Shadow Copied DLL accessing dependency DLLs from bin location

I am trying to resolve an issue with ASP.Net Framework 4.8 site using EFCore 3.1.16 in IIS. Microsoft.Data.SqlClient has a process lock on SNI.dll which causes issues with xcopy deployment in IIS. I have tried a strategy of copying the SNI.dll to…
GraemeMogo
  • 41
  • 3
1
vote
1 answer

How to create a VSS shadow copy in Powershell using only CIM cmdlets (not WMI cmdlets)?

Powershell newbie here, so please bear with me if the following question is silly ... I'd like to create a VSS snapshot in Powershell and have found many examples which use the WMI functions to do this. Common patterns are # Pattern…
Binarus
  • 4,005
  • 3
  • 25
  • 41
1
vote
2 answers

Making plugin folder writable in ASP.NET

I'm using MEF in a plugin based ASP.NET application. Wiring up a File System Watcher with Container.Refresh() any new plugin is loaded automatically upon being copied to the plugin folder. The problem is when I want to delete or replace a loaded…
Xaqron
  • 29,931
  • 42
  • 140
  • 205
1
vote
0 answers

Could not load assembly from dynamic directory

FileNotFoundException: Could not load file or assembly SnelStartGatewayInterface, Version=12.48.37.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. I got this message and found out…
Naaman
  • 11
  • 5
1
vote
1 answer

Removing one ShadowCopy with a batch file

I'm working on modifying a batch file used for backups. When it runs it creates a new shadowcopy, mounts it, backups what it should, and dismounts it. What I would like to do is have it delete the shadowcopy it created. I don't what to delete…
Drake
  • 21
  • 1
  • 3