473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

I am confused with load assembly in AppDomain

Hello,

I am confused with load assembly in AppDomain. I created ASP Web
application, same business logic is realized in custom DLLs, and I need to
load ones in my application. If I use ‘Load(assmblyRef)’ method of AppDomain
class, assembly is loaded but DLL file locked. I try to read DLL in byte[]
array and load assembly calling Load(byte[]) method. All are pretty, but in
contrast to calling Load(assmblyRef)’ method, calling Load(byte[]) method
results in assembly is loaded in domain each time (GetAssymles() method
brings assembly array which contains same versions of loading assembly). Can
anybody suggest approach how I can load custom dlls in application not
blocking DLL file.
Jul 10 '08 #1
2 1414
Hi,,,

Is the dll is a managed code dll or unmanaged code dll...?
Thanks

-----------
Munna

www.munna.shatkotha.com/blog
www.munna.shatkotha.com
www.shatkotha.com
Jul 12 '08 #2
Hi,
Seems it managed code one looks like:
protected Assembly CreateAssembly(string filename)
{
System.IO.FileStream fs = new System.IO.FileStream(filename,
System.IO.FileMode.Open);
byte[] buffer = new byte[(int)fs.Length];
fs.Read(buffer, 0, buffer.Length);
fs.Close();
Assembly asm = this.AppDomain.Load(buffer);
return asm;
}

"Munna" wrote:
Hi,,,

Is the dll is a managed code dll or unmanaged code dll...?
Thanks

-----------
Munna

www.munna.shatkotha.com/blog
www.munna.shatkotha.com
www.shatkotha.com
Jul 14 '08 #3

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

Similar topics

3
by: Raveendra | last post by:
Hi! I am trying to create one new Application Domain and calling one Assembly in that created Application Domain. It is working fine with stand alone application. But I need to do the same with...
2
by: Lauren Hines | last post by:
Hello, I have read numerous post stating that the only way to unload an assembly (DLL in my case) is to create a separate AppDomain, load the assembly, then unload it by calling AppDomain.Unload....
2
by: brianbender | last post by:
I am trying to load and unload assemblies dynamically and call methods and properties when loaded into an Appdomain I can load assemblies all day in the current AppDomain without references and...
1
by: John | last post by:
Hi, I tried to load a mixedmode dll (MC++) with AppDomain.Load(Byte ) in a C# Client. During the Load Process I got the following Exception: System.IO.FileLoadException: Ausnahme von...
6
by: Steve | last post by:
I'm playing with late binding and trying a very simple test to load an assembly In my "Host" application I have this code: <code> string modulePath =...
3
by: Frank Uray | last post by:
Hi all I have a problem with loading a assembly ... I am trying to do the following: - I have a directory with a dll (assembly) in it (not the currect dir.) - I am trying to load this assembly,...
1
by: chandu | last post by:
hello , i want to load and execute an existing dll in a applicaiton dynamically with out giving references etc... need to create separate appdomain or in same appdomain can i load and execute...
0
by: =?Utf-8?B?VmFubmk=?= | last post by:
Hello, I am trying to load up an Assembly in a newly created AppDomain: m_TempAppDomain = AppDomain.CreateDomain("Temporary", null, AppDomain.CurrentDomain.SetupInformation); byte...
1
by: ThunderMusic | last post by:
Hi, (My code is at the end of this post) I have an AppDomain that must load a simple assembly that has only one class with one method and it does not work... I receive this exception : "Could...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.