473,508 Members | 2,008 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reflection, ShadowCopyFiles

Hi,

We have a ASP.NET project that is using Reflection to load plugin dll's.

When needed to update the .dll's some of them are locked to readonly (used
by the main dll).

I understand that creating a Appdomain with .ShadowCopyFiles = "true" would
solve it, but shouldnt this be inherited from the ASP.NET application
itself? (because as I understand that is always using a shadow copy?)

If not, does anyone have a sample in VB.NET how to call a function that
creates a new appdomain and loads a dll using reflection?

- Fredrik Melin
Nov 18 '05 #1
1 1385
Yes, the app domain keeps a list of directories where it will use
shadow copy. Before using Asseembly.Load* you'll need to append to the
shadow copy paths used by your appdomain.

Something like:

AppDomain.CurrentDomain.SetShadowCopyPath(
AppDomain.CurrentDomain.SetupInformation.ShadowCop yDirectories +
";" +
"[CustomPath]"
);

HTH,

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 29 Nov 2004 11:34:33 +0100, "Fredrik Melin"
<me*@no-spam.dacsa-remove-this.net> wrote:
Hi,

We have a ASP.NET project that is using Reflection to load plugin dll's.

When needed to update the .dll's some of them are locked to readonly (used
by the main dll).

I understand that creating a Appdomain with .ShadowCopyFiles = "true" would
solve it, but shouldnt this be inherited from the ASP.NET application
itself? (because as I understand that is always using a shadow copy?)

If not, does anyone have a sample in VB.NET how to call a function that
creates a new appdomain and loads a dll using reflection?

- Fredrik Melin


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1361
by: A. Wiebenga | last post by:
Hi all! I am a student at the Hogeschool van Arnhem en Nijmegen in Holland. I am currently involved in a research project regarding Reflection. Purpose of the research project is to document...
10
7341
by: Sunny | last post by:
Hi, I have an old problem which I couldn't solve so far. Now I have found a post in that group that gave me an idea, but I can not fully understand it. The problem is: I'm trying to use a...
1
2164
by: Fredrik Rodin | last post by:
All, As far as I know, ASP.NET 2.0 automatically enable ShadowCopyFIles in the AppDomain. However, is there a way to run an ASP.NET 2.0 application _without_ ShadowCopyFiles enabled? Can I...
0
1535
by: Shawn Hogan | last post by:
Hi everyone, I've been trying to execute a control's private event code via reflection from another class with the goal of potentially doing some unit testing. The examples below are trying to...
5
4065
by: Rob | last post by:
Hello, I have upgraded my application from 1.1 to 2.0 framework. Now my application is giving me two warnings on methods that have been depreciated, SetShadowCopyFiles() and...
0
1177
by: John Wright | last post by:
I have the following code that creates a new appDomain and loads an exe using reflection. The problem I have is the exe file I pass in is still locked by the application. I have showcopyfiles =...
9
3829
by: Kuberan Naganathan | last post by:
Hello all Does anyone know of a good way to use reflection in c++? I don't mean simply using rtti or dynamic casting. I'm talking about java/c# style reflection where an actual instance of...
17
2291
by: raylopez99 | last post by:
What good is C# Reflection, other than to find out what types are in an assembly? And to dynamically invoke methods in an assembly (.dll or .exe)? Also, bonus question, can you use Reflection...
0
7227
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7331
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3204
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.