473,799 Members | 2,941 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assembly.LoadFr om when offline

Hi,
Does anyone know how to get an offline reference to an assembly that has
been downloaded using Assembly.LoadFr om.

E.g. Application downloads the assembly while it in online... next time it
is run it is offline and needs to still use that same assembly.
Assembly.LoadFr om throws an exception.

Cheers,
Greg
Nov 15 '05 #1
2 2166
Hi Greg,

You should probably cache the downloaded assembly locally.
If your app is online, check for cached version availability, then,
optionally, check for a newer version available online. If the assembly is
available in the cache [and there is no newer version], use it from the
cache.

If your app is offline, check the cache. If the assembly is there, load it
from disk and proceed. If it is not there - prompt the user to go online to
download missing components.

P.S. Most of this burden can be laid on the framework if you use so-called
No Touch Deployment. The framework utilizes a facility known as Downloaded
Assembly Cache then to store downloaded assemblies on disk.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Greg Bacchus" <FB**********@s pammotel.com> wrote in message
news:O2******** ******@TK2MSFTN GP10.phx.gbl...
Hi,
Does anyone know how to get an offline reference to an assembly that has
been downloaded using Assembly.LoadFr om.

E.g. Application downloads the assembly while it in online... next time it
is run it is offline and needs to still use that same assembly.
Assembly.LoadFr om throws an exception.

Cheers,
Greg


Nov 15 '05 #2
The downloaded assembly IS cached locally (as you say in the assembly cache)
but how do I reference it from there? I was hoping that it would be
intelligent enough to automatically look in the download cache by itself
when I referenced the web assembly!! The advantage with this is it then
automatically handles trickel deployment. So if that assembly references
another assembly that does not exist, the framework automatically looks in
the referenced location of the first one - on the web. You see this wouldn't
work if I have to make a local reference to the assembly.
Greg
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.c om> wrote
in message news:uG******** ******@TK2MSFTN GP10.phx.gbl...
Hi Greg,

You should probably cache the downloaded assembly locally.
If your app is online, check for cached version availability, then,
optionally, check for a newer version available online. If the assembly is
available in the cache [and there is no newer version], use it from the
cache.

If your app is offline, check the cache. If the assembly is there, load it
from disk and proceed. If it is not there - prompt the user to go online to download missing components.

P.S. Most of this burden can be laid on the framework if you use so-called
No Touch Deployment. The framework utilizes a facility known as Downloaded
Assembly Cache then to store downloaded assemblies on disk.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Greg Bacchus" <FB**********@s pammotel.com> wrote in message
news:O2******** ******@TK2MSFTN GP10.phx.gbl...
Hi,
Does anyone know how to get an offline reference to an assembly that has
been downloaded using Assembly.LoadFr om.

E.g. Application downloads the assembly while it in online... next time it is run it is offline and needs to still use that same assembly.
Assembly.LoadFr om throws an exception.

Cheers,
Greg

Nov 15 '05 #3

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

Similar topics

1
1324
by: Greg Bacchus | last post by:
Hi, Does anyone know how to get an offline reference to an assembly that has been downloaded using Assembly.LoadFrom. E.g. Application downloads the assembly while it in online... next time it is run it is offline and needs to still use that same assembly. Assembly.LoadFrom throws an exception. The downloaded assembly IS cached locally, in the assembly cache, but how do I reference it from there? I was hoping that it would be
4
2884
by: Arnaud Debaene | last post by:
Hello group. I have an app which can load "plugins" assemblies that are described in the registry (each registry entry gives the full path to the plugin ..dll file). The plugins may be anywhere on the disk. Each plugin defines a class which implements an interface known to the app. The main app loads the plugin with Assembly.LoadFrom and then uses Assembly.GetTypes() and Type.FindInterface to find the concrete types in the plugin that...
0
1644
by: surya | last post by:
Hi, I am using Assembly.LoadFrom within a web service to load assemblies from a web site. This web site is in the same machine where I am running the web service. The Assembly.LoadFrom(httpsite) method throws a file not found exception. I used the same code within a windows based application on the same machine and it worked, so if the windows based application can load the assembly why can't the web service find the same? I have been...
1
5022
by: Benjamin | last post by:
Hi, I'm currently writing a Web Services that interacts with a database. To allow me to use not just one database provider (for example, I could use MS Access, SQL Server or MySQL), the Web Service dynamically loads up an assembly that implements an Interface I called IDatabase. To load the assembly and create an object, I wrote this function: private IDatabase LoadDatabasePlugin( string assemblyFile, string
1
2907
by: lgbjr | last post by:
Hi All, I am moving some of my MDI Child forms to DLLs. The first 3 forms worked fine. But the 4th one is causing me some grief! I use the following code to load a form from a DLL: Dim asmAssemblyContainingForm As = .LoadFrom("neiconv.dll") Dim TypeToLoad As Type = asmAssemblyContainingForm.GetType("neiconv.Frm_ND")
6
44489
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 = @"C:\PMDRepository\Tools\ManfBusProcMgr\Modules\TestModule\bin\Debug\TestModule"; Assembly a = Assembly.Load(modulePath); </code>
6
1840
by: shrishjain | last post by:
Hi All, I call Assembly.LoadFrom("C:\\MyDir\\MyAssembly.dll")- it works fine. However when I call the following, it fails: Assembly.LoadFrom("C:\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\ ...\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\ MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\...
4
4475
by: =?Utf-8?B?SmFu?= | last post by:
I have a .NET 2.0 application divided in two assemblies; the exe and a dll. The application generates a plugin-dll which is then loaded in a separate AppDomain (along with a second instance of my application dll). It's been working for months and now the it's not working from my application exe anymore but still working from NUnit when testing the dll. What could have changed in my exe? Some configuration thing in my VS2005 project?
3
1791
by: dbhurt15 | last post by:
Let me say first that I'm brand new to .NET I'm having a small issue. I'm working on a large project. My part is using a .dll located in another directory. I'm having problems referencing to that external dll What I'm doing right now is using this on form load: Dim Asmpath As String = ("C:\Common\newLib.dll") Dim Asm As System.Reflection.Assembly = System.Reflection.Assembly.LoadFrom(Asmpath)
0
9686
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9540
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10475
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10026
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7564
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4139
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 we have to send another system
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.